exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

rna-transcription-test.el (789B)


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