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

Version Path
trackler-2.2.1.180 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.179 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.178 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.177 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.176 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.175 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.174 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.173 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.172 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.171 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.170 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.169 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.167 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.166 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.165 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.164 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.163 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.162 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.161 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr
trackler-2.2.1.160 tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr