Sha256: ea311aee0a968ec38e8f008f3fa2bdae336ae78b2cf26a8fdc08a45b7bac836a

Contents?: true

Size: 1.11 KB

Versions: 116

Compression:

Stored size: 1.11 KB

Contents

-module(nucleotide_count_tests).

-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").

empty_dna_string_has_no_adenine_test() ->
  ?assertEqual(0, nucleotide_count:count("", "A")).

repetitive_cytosine_gets_counted_test() ->
  ?assertEqual(5, nucleotide_count:count("CCCCC", "C")).

counts_only_thymine_test() ->
  ?assertEqual(1, nucleotide_count:count("GGGGGTAACCCGG", "T")).

validates_nucleotides_test() ->
  ?assertException(error, "Invalid nucleotide", nucleotide_count:count("GACT", "X")).

empty_dna_string_has_no_nucleotides_test() ->
  ?assertEqual([{"A", 0}, {"T", 0}, {"C", 0}, {"G", 0}], nucleotide_count:nucleotide_counts("")).

repetitive_sequence_has_only_guanine_test() ->
  ?assertEqual([{"A", 0}, {"T", 0}, {"C", 0}, {"G", 8}], nucleotide_count:nucleotide_counts("GGGGGGGG")).

counts_all_nucleotides_test() ->
  ?assertEqual(
     [{"A", 20}, {"T", 21}, {"C", 12}, {"G", 17}],
     nucleotide_count:nucleotide_counts(
       "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC")).

version_test() ->
  ?assertMatch(1, nucleotide_count:test_version()).

Version data entries

116 entries across 116 versions & 1 rubygems

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