From 4eff667b92ff7ef4c3542650509c03fb0de5cbce Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 25 Feb 2022 19:15:29 +0100 Subject: Added an another engine for motus, using entropy instead of frequencies only --- motus/test/motus_test.ml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'motus/test') 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) ) ] -- cgit v1.2.3