Exercism: Go version of the 'Raindrops' exercise.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
535 B

package raindrops
import "testing"
const targetTestVersion = 2
func TestConvert(t *testing.T) {
if testVersion != targetTestVersion {
t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion)
}
for _, test := range tests {
if actual := Convert(test.input); actual != test.expected {
t.Errorf("Convert(%d) = %q, expected %q.",
test.input, actual, test.expected)
}
}
}
func BenchmarkConvert(b *testing.B) {
for i := 0; i < b.N; i++ {
for _, test := range tests {
Convert(test.input)
}
}
}