Sha256: 1bf293e1b80e910f3859c73d8306e40774a0b24f23bda5de46062e291d9c5061
Contents?: true
Size: 806 Bytes
Versions: 39
Compression:
Stored size: 806 Bytes
Contents
package acronym import ( "testing" ) const targetTestVersion = 1 type testCase struct { input string expected string } var stringTestCases = []testCase{ {"Portable Network Graphics", "PNG"}, {"HyperText Markup Language", "HTML"}, {"Ruby on Rails", "ROR"}, {"PHP: Hypertext Preprocessor", "PHP"}, {"First In, First Out", "FIFO"}, {"Complementary metal-oxide semiconductor", "CMOS"}, } func TestTestVersion(t *testing.T) { if testVersion != targetTestVersion { t.Errorf("Found testVersion = %v, want %v.", testVersion, targetTestVersion) } } func TestAcronym(t *testing.T) { for _, test := range stringTestCases { actual := abbreviate(test.input) if actual != test.expected { t.Errorf("Acronym test [%s], expected [%s], actual [%s]", test.input, test.expected, actual) } } }
Version data entries
39 entries across 39 versions & 1 rubygems