ocaml-ppx / ppx_import

Less redundancy in type declarations and signatures
MIT License
89 stars 29 forks source link

add cram test to cover error cases #77

Closed tatchi closed 1 year ago

tatchi commented 1 year ago

Based on https://github.com/ocaml-ppx/ppx_import/pull/76

Add some tests to cover error cases. It will be useful for https://github.com/ocaml-ppx/ppx_import/pull/73

@ejgallego Can you think of any other error case?

tatchi commented 1 year ago

There were some differences in test results with OCaml <= 4.07. So I duplicated them in two 2 files, one that runs with OCaml <= 4.07 and the other with OCaml>4.07. A bit annoying to have to duplicate the tests, but I didn't find any better solution. Let me know if you can think of a better way.

After that, there was still a small difference due to a difference between my local version of sexplib0 and the one installed in CI. I added "sexplib0" { with-test & >= "v0.15.0" } in opam file to fix it. Does that sound reasonable?

ejgallego commented 1 year ago

Sounds perfect to me, thanks!

tatchi commented 1 year ago

Thanks @ejgallego. I'll now focus on https://github.com/ocaml-ppx/ppx_import/pull/73 🤗