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.119 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.118 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.117 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.116 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.115 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.114 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.113 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.111 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.110 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.109 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.108 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.107 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.106 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.105 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.104 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.103 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.102 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.101 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.100 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt
trackler-2.2.1.99 tracks/racket/exercises/nucleotide-count/nucleotide-count-test.rkt