Sha256: a8f3217288b3fafa34b2d2c1b77172796ea2ad3b0a459c29f027867f27fe76a7

Contents?: true

Size: 1.55 KB

Versions: 79

Compression:

Stored size: 1.55 KB

Contents

// This file was auto-generated based on version 1.3.0 of the canonical data.

module NucleotideCountTest

open FsUnit.Xunit
open Xunit

open NucleotideCount

[<Fact>]
let ``Empty strand`` () =
    let strand = ""
    let expected = 
        [ ('A', 0);
          ('C', 0);
          ('G', 0);
          ('T', 0) ]
        |> Map.ofList
        |> Some
    nucleotideCounts strand |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Can count one nucleotide in single-character input`` () =
    let strand = "G"
    let expected = 
        [ ('A', 0);
          ('C', 0);
          ('G', 1);
          ('T', 0) ]
        |> Map.ofList
        |> Some
    nucleotideCounts strand |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Strand with repeated nucleotide`` () =
    let strand = "GGGGGGG"
    let expected = 
        [ ('A', 0);
          ('C', 0);
          ('G', 7);
          ('T', 0) ]
        |> Map.ofList
        |> Some
    nucleotideCounts strand |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Strand with multiple nucleotides`` () =
    let strand = "AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC"
    let expected = 
        [ ('A', 20);
          ('C', 12);
          ('G', 17);
          ('T', 21) ]
        |> Map.ofList
        |> Some
    nucleotideCounts strand |> should equal expected

[<Fact(Skip = "Remove to run test")>]
let ``Strand with invalid nucleotides`` () =
    let strand = "AGXXACT"
    let expected = None
    nucleotideCounts strand |> should equal expected

Version data entries

79 entries across 79 versions & 1 rubygems

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