Sha256: 8afd03369d9142c05ebf3a0654adc2a6a88d8410312eea1aa66a3d3bb57607b3
Contents?: true
Size: 621 Bytes
Versions: 122
Compression:
Stored size: 621 Bytes
Contents
package say import ( "testing" ) func TestSay(t *testing.T) { for _, tc := range testCases { actual, ok := Say(tc.input) if tc.expectError { if ok { t.Fatalf("FAIL: %s\nExpected error but received: %v", tc.description, actual) } } else if !ok { t.Fatalf("FAIL: %s\nDid not expect an error", tc.description) } else if actual != tc.expected { t.Fatalf("FAIL: %s\nExpected: %v\nActual: %v", tc.description, tc.expected, actual) } t.Logf("PASS: %s", tc.description) } } func BenchmarkSay(b *testing.B) { for i := 0; i < b.N; i++ { for _, tc := range testCases { Say(tc.input) } } }
Version data entries
122 entries across 122 versions & 1 rubygems