Skip to content

Commit 2e31af1

Browse files
authored
rna-transcription: Implement tests (#681)
1 parent c4b923f commit 2e31af1

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
(ns rna-transcription-test
2-
(:require [clojure.test :refer [deftest is]]
2+
(:require [clojure.test :refer [deftest testing is]]
33
rna-transcription))
44

5-
(deftest transcribes-cytosine-to-guanine
6-
(is (= "G" (rna-transcription/to-rna "C"))))
5+
(deftest empty-sequence
6+
(testing "Empty RNA sequence"
7+
(is (= "" (rna-transcription/to-rna "")))))
78

8-
(deftest transcribes-guanine-to-cytosine
9-
(is (= "C" (rna-transcription/to-rna "G"))))
9+
(deftest rna-complement-of-cytosine
10+
(testing "RNA complement of cytosine is guanine"
11+
(is (= "G" (rna-transcription/to-rna "C")))))
1012

11-
(deftest transcribes-adenine-to-uracil
12-
(is (= "U" (rna-transcription/to-rna "A"))))
13+
(deftest rna-complement-of-guanine
14+
(testing "RNA complement of guanine is cytosine"
15+
(is (= "C" (rna-transcription/to-rna "G")))))
1316

14-
(deftest it-transcribes-thymine-to-adenine
15-
(is (= "A" (rna-transcription/to-rna "T"))))
17+
(deftest rna-complement-of-thymine
18+
(testing "RNA complement of thymine is adenine"
19+
(is (= "A" (rna-transcription/to-rna "T")))))
1620

17-
(deftest it-transcribes-all-nucleotides
18-
(is (= "UGCACCAGAAUU" (rna-transcription/to-rna "ACGTGGTCTTAA"))))
21+
(deftest rna-complement-of-adenine
22+
(testing "RNA complement of adenine is uracil"
23+
(is (= "U" (rna-transcription/to-rna "A")))))
1924

20-
(deftest it-validates-dna-strands
21-
(is (thrown? AssertionError (rna-transcription/to-rna "XCGFGGTDTTAA"))))
25+
(deftest rna-complement
26+
(testing "RNA complement"
27+
(is (= "UGCACCAGAAUU" (rna-transcription/to-rna "ACGTGGTCTTAA")))))

0 commit comments

Comments
 (0)