Sha256: 370d24d878bbbb55bf831a2245da55020d3aee264f5c4408f64e1d846c0bcdfa
Contents?: true
Size: 853 Bytes
Versions: 396
Compression:
Stored size: 853 Bytes
Contents
#lang racket/base (require "nucleotide-count.rkt") (module+ test (require rackunit rackunit/text-ui) (define suite (test-suite "nucleotide count tests" (test-equal? "empty dna strand has no nucleotides" (nucleotide-counts "") '((#\A . 0) (#\C . 0) (#\G . 0) (#\T . 0))) (test-equal? "repetitive sequence has only guanine" (nucleotide-counts "GGGGGGGG") '((#\A . 0) (#\C . 0) (#\G . 8) (#\T . 0))) (test-equal? "counts all nucleotides" (nucleotide-counts "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC") '((#\A . 20) (#\C . 12) (#\G . 17) (#\T . 21))) (test-exn "invalid nucleotide" exn:fail? (lambda () (nucleotide-counts "AGGTCCXGA"))))) (run-tests suite))
Version data entries
396 entries across 396 versions & 1 rubygems