aboutsummaryrefslogtreecommitdiff
path: root/motus/test/motus_test.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2022-02-25 19:15:29 +0100
committerSébastien Dailly <sebastien@dailly.me>2022-02-25 19:15:29 +0100
commit4eff667b92ff7ef4c3542650509c03fb0de5cbce (patch)
tree6a6180d355d0ab78626ad5988c5203ee20344187 /motus/test/motus_test.ml
parent95432043550bd4a41b4466395502bc3b748e6746 (diff)
Added an another engine for motus, using entropy instead of frequencies only
Diffstat (limited to 'motus/test/motus_test.ml')
-rw-r--r--motus/test/motus_test.ml10
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) )
]