Mutation_testThe information about a mutant is made up of:
module M : sig ... endRunning mutation tests on a student's test suite. For testing a function called foo, the student's tests should be in a variable called foo_tests.
include module type of MRun a test (a pair of input and expected output) on a mutant function. Returns true if the mutant *fails* the test, either by deviating from the expected output or by raising an error. Returns false if the mutant *passes* the test. The compare parameter specifies a comparison function for comparing the expected and actual outputs, and defaults to structural equality ((=)).
val test_unit_tests_1 :
?test_student_soln:bool ->
?test:('b -> 'b -> bool) ->
('a -> 'b) Ty.ty ->
string ->
('a -> 'b) mutant_info list ->
Learnocaml_report.tval test_unit_tests_2 :
?test_student_soln:bool ->
?test:('c -> 'c -> bool) ->
('a -> 'b -> 'c) Ty.ty ->
string ->
('a -> 'b -> 'c) mutant_info list ->
Learnocaml_report.tval test_unit_tests_3 :
?test_student_soln:bool ->
?test:('d -> 'd -> bool) ->
('a -> 'b -> 'c -> 'd) Ty.ty ->
string ->
('a -> 'b -> 'c -> 'd) mutant_info list ->
Learnocaml_report.tval test_unit_tests_4 :
?test_student_soln:bool ->
?test:('e -> 'e -> bool) ->
('a -> 'b -> 'c -> 'd -> 'e) Ty.ty ->
string ->
('a -> 'b -> 'c -> 'd -> 'e) mutant_info list ->
Learnocaml_report.tTo be called on a report returned by one of the test_unit_tests_<args_nb> functions, for checking whether the student passed or failed mutation testing. The Learnocaml_report.result function is not sufficient for checking this since a report will register as a failure if the student's implementation does not pass all of their own tests, even if the student did pass mutation testing. If this function is called on a report that did not result from one of the above 4 functions, the result is undefined.