1
exercism fetch go zebra-puzzle

zebra_puzzle_test.go

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package zebra

import "testing"

func TestSolvePuzzle(t *testing.T) {
	expected := Solution{DrinksWater: "Norwegian", OwnsZebra: "Japanese"}
	actual := SolvePuzzle()
	if expected != actual {
		t.Fatalf("FAILED:\nExpected: %#v\nActual: %#v",
			expected, actual)
	}
}

func BenchmarkScore(b *testing.B) {
	for i := 0; i < b.N; i++ {
		SolvePuzzle()
	}
}