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.98 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.97 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.96 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.95 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.94 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.93 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.92 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.91 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.90 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.89 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.88 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.87 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.86 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.85 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.84 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.83 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.82 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.81 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.80 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.79 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt