Skip to content

Commit

Permalink
Swap expected and result order
Browse files Browse the repository at this point in the history
  • Loading branch information
BNAndras committed Apr 22, 2024
1 parent 9293864 commit 7083f89
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions exercises/practice/nucleotide-count/nucleotide-count-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,23 @@


(ert-deftest empty-dna-strand-has-no-nucleotides-test ()
(should (equal (sort-pairs (nucleotide-count "") #'<)
'((?A . 0) (?C . 0) (?G . 0) (?T . 0)))))
(should (equal '((?A . 0) (?C . 0) (?G . 0) (?T . 0))
(sort-pairs (nucleotide-count "") #'<))))


(ert-deftest repetitive-sequence-has-only-guanine-test ()
(should (equal (sort-pairs (nucleotide-count "GGGGGGGG") #'<)
'((?A . 0) (?C . 0) (?G . 8) (?T . 0)))))
(should (equal '((?A . 0) (?C . 0) (?G . 8) (?T . 0))
(sort-pairs (nucleotide-count "GGGGGGGG") #'<))))


(ert-deftest count-all-nucleotides-test ()
(should (equal (sort-pairs (nucleotide-count "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC") #'<)
'((?A . 20) (?C . 12) (?G . 17) (?T . 21)))))
(should (equal '((?A . 20) (?C . 12) (?G . 17) (?T . 21))
(sort-pairs (nucleotide-count "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC") #'<))))


(ert-deftest invalid-nucleotide-test ()
(should-error (nucleotide-count "AGGTCCXGA")))


(provide 'nucleotide-count)
(provide 'nucleotide-count-test)
;;; nucleotide-count-test.el ends here

0 comments on commit 7083f89

Please sign in to comment.