blob: b00de89492dd1f65004d1e65f8006fcb6c7a7eb2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
;;; rna-transcription-test.el --- Tests for RNA Transcription (exercism)
;;; Commentary:
;;; Code:
(require 'cl-lib)
(load-file "rna-transcription.el")
(ert-deftest transcribes-cytosine-to-guanine ()
(should (string= "G" (to-rna "C"))))
(ert-deftest transcribes-guanine-to-cytosine ()
(should (string= "C" (to-rna "G"))))
(ert-deftest transcribes-adenine-to-uracil ()
(should (string= "U" (to-rna "A"))))
(ert-deftest transcribes-thymine-to-adenine ()
(should (string= "A" (to-rna "T"))))
(ert-deftest it-transcribes-all-nucleotides ()
(should (string= "UGCACCAGAAUU"
(to-rna "ACGTGGTCTTAA"))))
(ert-deftest it-validates-dna-strands ()
(should-error (to-rna "XCGFGGTDTTAA")))
(provide 'rna-transcription-test)
;;; rna-transcription-test.el ends here
|