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.159 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.158 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.157 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.156 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.155 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.154 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.153 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.152 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.151 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.150 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.149 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.148 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.147 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.146 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.145 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.144 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.143 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.142 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.141 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go
trackler-2.2.1.140 tracks/go/exercises/nucleotide-count/nucleotide_count_test.go