Sha256: dd9c603e79ef28bb88fb85527f854ab3c21a31702fa7a76b0b49d05479864b08
Contents?: true
Size: 706 Bytes
Versions: 185
Compression:
Stored size: 706 Bytes
Contents
package wordcount import ( "reflect" "testing" ) const targetTestVersion = 3 func TestTestVersion(t *testing.T) { if testVersion != targetTestVersion { t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion) } } func TestWordCount(t *testing.T) { for _, tt := range testCases { expected := tt.output actual := WordCount(tt.input) if !reflect.DeepEqual(actual, expected) { t.Fatalf("%s\n\tExpected: %v\n\tGot: %v", tt.description, expected, actual) } else { t.Logf("PASS: %s - WordCount(%s)", tt.description, tt.input) } } } func BenchmarkWordCount(b *testing.B) { for i := 0; i < b.N; i++ { for _, tt := range testCases { WordCount(tt.input) } } }
Version data entries
185 entries across 185 versions & 1 rubygems