Sha256: c885c1cfa540702ce7f65e71a0b92bf27f611fc38bcec8944cab3f203d548269

Contents?: true

Size: 655 Bytes

Versions: 86

Compression:

Stored size: 655 Bytes

Contents

package dna

import (
	"reflect"
	"testing"
)

func TestCounts(t *testing.T) {
	for _, tc := range testCases {
		dna := DNA(tc.strand)
		s, err := dna.Counts()
		if tc.errorExpected {
			if err == nil {
				t.Fatalf("FAIL: %s\nCounts(%q)\nExpected error\nActual: %#v",
					tc.description, tc.strand, s)
			}
		} else if err != nil {
			t.Fatalf("FAIL: %s\nCounts(%q)\nExpected: %#v\nGot error: %q",
				tc.description, tc.strand, tc.expected, err)
		} else if !reflect.DeepEqual(s, tc.expected) {
			t.Fatalf("FAIL: %s\nCounts(%q)\nExpected: %#v\nActual: %#v",
				tc.description, tc.strand, tc.expected, s)
		}
		t.Logf("PASS: %s", tc.description)
	}
}

Version data entries

86 entries across 86 versions & 1 rubygems

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