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

Version Path
trackler-2.2.1.180 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.179 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.178 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.177 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.176 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.175 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.174 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.173 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.172 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.171 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.170 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.169 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.167 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.166 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.165 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.164 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.163 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.162 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.161 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.160 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt