Skip to content

Commit

Permalink
Merge pull request #508 from NathanReb/simplify-502-migration-locatio…
Browse files Browse the repository at this point in the history
…n-check-test

Simplify 502 migration location check test
  • Loading branch information
NathanReb authored Jul 15, 2024
2 parents 9ead221 + 3b51e73 commit 62f49bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 55 deletions.
49 changes: 0 additions & 49 deletions test/502_pexpfun/check_locations_integrity.ml

This file was deleted.

1 change: 1 addition & 0 deletions test/502_pexpfun/driver.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
let () = Ppxlib.Driver.standalone ()
7 changes: 3 additions & 4 deletions test/502_pexpfun/dune
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
(executable
(name check_locations_integrity)
(name driver)
(enabled_if
(>= %{ocaml_version} "5.2"))
(libraries ppxlib ppxlib.ast ppxlib.astlib ocaml-compiler-libs.common
compiler-libs.common))
(libraries ppxlib))

(cram
(enabled_if
(>= %{ocaml_version} "5.2"))
(deps check_locations_integrity.exe))
(deps driver.exe))
4 changes: 2 additions & 2 deletions test/502_pexpfun/run.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ We run a custom driver that will read our ast, migrate it back to 5.01, and
check that the locations are valid (the parent range is larger than the child
range).

$ ./check_locations_integrity.exe --impl test.ml -o ignore.ml
$ ./driver.exe -locations-check --impl test.ml -o ignore.ml

Locations should also be well formed for Pparam_newtype
$ cat > test.ml << EOF
> let make (type t) (type u) foo = foo
> EOF

$ ./check_locations_integrity.exe --impl test.ml -o ignore.ml
$ ./driver.exe -locations-check --impl test.ml -o ignore.ml

0 comments on commit 62f49bf

Please sign in to comment.