mirror of
https://github.com/correl/elm.git
synced 2024-12-18 19:21:37 +00:00
Merge pull request #72 from RiderSargent/fixed-hamming-tests
Fixed order of parameters for Hamming exercise's tests.
This commit is contained in:
commit
3c4e15a23c
1 changed files with 14 additions and 14 deletions
|
@ -12,46 +12,46 @@ tests =
|
||||||
"Hamming"
|
"Hamming"
|
||||||
[ test
|
[ test
|
||||||
"identical strands"
|
"identical strands"
|
||||||
(assertEqual (distance "A" "A") (Just 0))
|
(assertEqual (Just 0) (distance "A" "A"))
|
||||||
, test
|
, test
|
||||||
"long identical strands"
|
"long identical strands"
|
||||||
(assertEqual (distance "GGACTGA" "GGACTGA") (Just 0))
|
(assertEqual (Just 0) (distance "GGACTGA" "GGACTGA"))
|
||||||
, test
|
, test
|
||||||
"complete distance in single nucleotide strands"
|
"complete distance in single nucleotide strands"
|
||||||
(assertEqual (distance "A" "G") (Just 1))
|
(assertEqual (Just 1) (distance "A" "G"))
|
||||||
, test
|
, test
|
||||||
"complete distance in small strands"
|
"complete distance in small strands"
|
||||||
(assertEqual (distance "AG" "CT") (Just 2))
|
(assertEqual (Just 2) (distance "AG" "CT"))
|
||||||
, test
|
, test
|
||||||
"small distance in small strands"
|
"small distance in small strands"
|
||||||
(assertEqual (distance "AT" "CT") (Just 1))
|
(assertEqual (Just 1) (distance "AT" "CT"))
|
||||||
, test
|
, test
|
||||||
"small distance"
|
"small distance"
|
||||||
(assertEqual (distance "GGACG" "GGTCG") (Just 1))
|
(assertEqual (Just 1) (distance "GGACG" "GGTCG"))
|
||||||
, test
|
, test
|
||||||
"small distance in long strands"
|
"small distance in long strands"
|
||||||
(assertEqual (distance "ACCAGGG" "ACTATGG") (Just 2))
|
(assertEqual (Just 2) (distance "ACCAGGG" "ACTATGG"))
|
||||||
, test
|
, test
|
||||||
"non-unique character in first strand"
|
"non-unique character in first strand"
|
||||||
(assertEqual (distance "AGA" "AGG") (Just 1))
|
(assertEqual (Just 1) (distance "AGA" "AGG"))
|
||||||
, test
|
, test
|
||||||
"non-unique character in second strand"
|
"non-unique character in second strand"
|
||||||
(assertEqual (distance "AGG" "AGA") (Just 1))
|
(assertEqual (Just 1) (distance "AGG" "AGA"))
|
||||||
, test
|
, test
|
||||||
"large distance"
|
"large distance"
|
||||||
(assertEqual (distance "GATACA" "GCATAA") (Just 4))
|
(assertEqual (Just 4) (distance "GATACA" "GCATAA"))
|
||||||
, test
|
, test
|
||||||
"large distance in off-by-one strand"
|
"large distance in off-by-one strand"
|
||||||
(assertEqual (distance "GGACGGATTCTG" "AGGACGGATTCT") (Just 9))
|
(assertEqual (Just 9) (distance "GGACGGATTCTG" "AGGACGGATTCT"))
|
||||||
, test
|
, test
|
||||||
"empty strands"
|
"empty strands"
|
||||||
(assertEqual (distance "" "") (Just 0))
|
(assertEqual (Just 0) (distance "" ""))
|
||||||
, test
|
, test
|
||||||
"disallow first strand longer"
|
"disallow first strand longer"
|
||||||
(assertEqual (distance "AATG" "AAA") Nothing)
|
(assertEqual Nothing (distance "AATG" "AAA"))
|
||||||
, test
|
, test
|
||||||
"disallow second strand longer"
|
"disallow second strand longer"
|
||||||
(assertEqual (distance "ATA" "AGTG") Nothing)
|
(assertEqual Nothing (distance "ATA" "AGTG"))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue