Sha256: 02746fc186569436d97671e4e6980ae87a34a986dd8a9136d46b867404d082f4

Contents?: true

Size: 551 Bytes

Versions: 63

Compression:

Stored size: 551 Bytes

Contents

package yacht

import (
	"testing"
)

func TestScore(t *testing.T) {
	for _, testCase := range testCases {
		score := Score(testCase.dice, testCase.category)
		if testCase.expected != score {
			t.Fatalf("FAIL: %s\nScore %v as %s. expected %d, got %d",
				testCase.description, testCase.dice, testCase.category,
				testCase.expected, score)
		}
		t.Logf("PASS: %s", testCase.description)
	}
}

func BenchmarkScore(b *testing.B) {
	for i := 0; i < b.N; i++ {
		for _, testCase := range testCases {
			Score(testCase.dice, testCase.category)
		}
	}
}

Version data entries

63 entries across 63 versions & 1 rubygems

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