Sha256: 045875660e3f3bd17e8e102f5346ed0361891e59fc576168fd36c3274285d51f
Contents?: true
Size: 1.05 KB
Versions: 78
Compression:
Stored size: 1.05 KB
Contents
module Test.RnaTranscription import RnaTranscription import Data.Vect %access export assertCase : Eq b => (a -> b) -> (String, a, b) -> IO () assertCase fn (desc,given,expected) = do putStrLn desc if fn given == expected then putStrLn " Test Passed" else putStrLn " Test Failed" testCases : List (n : Nat ** (String, Vect n DnaStrand, Vect n RnaStrand)) testCases = [(_ ** ("RNA complement of cytosine is guanine", [C], [G])), (_ ** ("RNA complement of guanine is cytosine", [G], [C])), (_ ** ("RNA complement of thymine is adenine", [T], [A])), (_ ** ("RNA complement of adenine is uracil", [A], [U])), (_ ** ("RNA complement", [A,C,G,T,G,G,T,C,T,T,A,A], [U,G,C,A,C,C,A,G,A,A,U,U]))] runTests : IO () runTests = traverse_ testCase' testCases where testCase' : (n : Nat ** (String, Vect n DnaStrand, Vect n RnaStrand)) -> IO () testCase' (x ** pf) = assertCase toRna pf
Version data entries
78 entries across 78 versions & 1 rubygems