Sha256: 336a075778082d96e607aed549d1e90647f5a0427e937622f61a24136ef5d73d

Contents?: true

Size: 839 Bytes

Versions: 57

Compression:

Stored size: 839 Bytes

Contents

package wordcount

// Source: exercism/x-common
// Commit: 3b07e53 Merge pull request #117 from mikeyjcat/add-raindrops-json

var testCases = []struct {
	description string
	input       string
	output      Frequency
}{
	{
		"count one word",
		"word",
		Frequency{"word": 1},
	},
	{
		"count one of each word",
		"one of each",
		Frequency{"each": 1, "of": 1, "one": 1},
	},
	{
		"multiple occurrences of a word",
		"one fish two fish red fish blue fish",
		Frequency{"blue": 1, "fish": 4, "one": 1, "red": 1, "two": 1},
	},
	{
		"ignore punctuation",
		"car : carpet as java : javascript!!&@$%^&",
		Frequency{"as": 1, "car": 1, "carpet": 1, "java": 1, "javascript": 1},
	},
	{
		"include numbers",
		"testing, 1, 2 testing",
		Frequency{"1": 1, "2": 1, "testing": 2},
	},
	{
		"normalize case",
		"go Go GO",
		Frequency{"go": 3},
	},
}

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
trackler-2.0.5.0 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.4.0 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.9 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.8 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.7 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.6 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.5 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.4 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.3 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.2 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.1 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.3.0 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.2.0 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.1.2 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.1.1 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.1.0 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.0.10 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.0.9 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.0.8 tracks/go/exercises/word-count/cases_test.go
trackler-2.0.0.7 tracks/go/exercises/word-count/cases_test.go