Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for the lighter ppx syntax: {foo%expect| ... |foo} #37

Open
smondet opened this issue Oct 8, 2021 · 0 comments
Open

Support for the lighter ppx syntax: {foo%expect| ... |foo} #37

smondet opened this issue Oct 8, 2021 · 0 comments
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@smondet
Copy link

smondet commented Oct 8, 2021

Right now (0.14.1) when using {%expect| ...|} if the test succeeds it works, but if it fails the test-driver crashes while trying to make the corrected file:

Fatal error: exception ("Expect test evaluator bug" (exn (Invalid_argument "Negative length: -8"))
  (backtrace
     "Raised at Base__Exn.protectx in file \"src/exn.ml\", line 71, characters 4-114\
    \nCalled from Ppx_expect_evaluator.process_group.write_corrected in file \"evaluator/ppx_expect_evaluator.ml\" (inlined), line 181, characters 6-88\
    \nCalled from Ppx_expect_evaluator.process_group in file \"evaluator/ppx_expect_evaluator.ml\", line 191, characters 10-45\
    \nCalled from Ppx_expect_evaluator.evaluate_tests.(fun) in file \"evaluator/ppx_expect_evaluator.ml\", line 218, characters 6-83\
    \n")
  (filename lib/stdmisc/v0.ml))
Raised at Base__Error.raise in file "src/error.ml" (inlined), line 8, characters 14-30
Called from Base__Error.raise_s in file "src/error.ml", line 9, characters 19-40
Called from Base__List.count_map in file "src/list.ml", line 387, characters 13-17
Called from Base__List.map in file "src/list.ml" (inlined), line 418, characters 15-31
Called from Ppx_expect_evaluator.evaluate_tests in file "evaluator/ppx_expect_evaluator.ml" (inlined), line 216, characters 5-486
Called from Ppx_expect_evaluator.evaluate_tests in file "evaluator/ppx_expect_evaluator.ml", line 215, characters 2-572
Called from Stdlib__List.map in file "list.ml", line 92, characters 20-23
Called from Stdlib__List.map in file "list.ml", line 92, characters 32-39
Called from Ppx_inline_test_lib__Runtime.exit in file "runtime-lib/runtime.ml", line 615, characters 2-49


@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

2 participants