jmid / mutaml

An OCaml mutation tester
BSD 2-Clause "Simplified" License
65 stars 4 forks source link

Fix incompatibility with Core #30

Closed jmid closed 1 month ago

jmid commented 1 month ago

The second issue of #28 is that the ppx is emitting a polymorphic comparison = between string options to detect which mutant we are running. After open Core = is however redefined to an integer comparison function int -> int -> bool, thus leading to a type error in the generated code.

This PR therefore changes the mutation strategy by emitting a helper function __is_mutaml_mutant__ in the preamble, which just relies on String.equal, available in both Stdlib and Core.

The meat is in the first commit, updating the ppx. The second commit adds a regression cram test. The third commit just updates and adjusts the existing cram tests.

jmid commented 1 month ago

CI fails on the same two platforms as #29:

Since this is now working as intended I'll go ahead and merge