Sha256: fa19bb79d4f4c42b5c5ed29184ce5ee5781d60cfce189143c2ec831e81e2c529
Contents?: true
Size: 1.16 KB
Versions: 11
Compression:
Stored size: 1.16 KB
Contents
if !System.get_env("EXERCISM_TEST_EXAMPLES") do Code.load_file("nucleotide_count.exs", __DIR__) end ExUnit.start ExUnit.configure exclude: :pending, trace: true defmodule NucleotideCountTest do use ExUnit.Case # @tag :pending test "empty dna string has no adenosine" do assert NucleotideCount.count('', ?A) == 0 end @tag :pending test "repetitive cytidine gets counted" do assert NucleotideCount.count('CCCCC', ?C) == 5 end @tag :pending test "counts only thymidine" do assert NucleotideCount.count('GGGGGTAACCCGG', ?T) == 1 end @tag :pending test "empty dna string has no nucleotides" do expected = %{?A => 0, ?T => 0, ?C => 0, ?G => 0} assert NucleotideCount.histogram('') == expected end @tag :pending test "repetitive sequence has only guanosine" do expected = %{?A => 0, ?T => 0, ?C => 0, ?G => 8} assert NucleotideCount.histogram('GGGGGGGG') == expected end @tag :pending test "counts all nucleotides" do s = 'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC' expected = %{?A => 20, ?T => 21, ?C => 12, ?G => 17} assert NucleotideCount.histogram(s) == expected end end
Version data entries
11 entries across 11 versions & 1 rubygems