diff options
Diffstat (limited to 'motus/test')
-rw-r--r-- | motus/test/motus_test.ml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/motus/test/motus_test.ml b/motus/test/motus_test.ml index 4ea952e..0586ffe 100644 --- a/motus/test/motus_test.ml +++ b/motus/test/motus_test.ml @@ -37,14 +37,20 @@ let tests = assert_equal 243 count ) ; ( "Compare words 1" >:: fun _ -> + let w = "Test" in + + let ref = (w, Validity.CharSet.of_seq (String.to_seq w)) in + assert_equal (Some Validity.[| Wellplaced; Wellplaced; Wellplaced; Wellplaced |]) - (Validity.compare_words "Test" ~ref:"Test") ) + (Validity.compare_words "Test" ~ref) ) ; ( "Compare words 2" >:: fun _ -> + let w = "ABC" in + let ref = (w, Validity.CharSet.of_seq (String.to_seq w)) in assert_equal (Some Validity.[| Missing; Misplaced; Wellplaced |]) - (Validity.compare_words "DAC" ~ref:"ABC") ) + (Validity.compare_words "DAC" ~ref) ) ] |