MCPcopy Create free account
hub / github.com/Pallinder/go-randomdata / TestCountry

Function TestCountry

random_data_test.go:159–180  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

157}
158
159func TestCountry(t *testing.T) {
160 t.Log("TestCountry")
161 countryFull := Country(FullCountry)
162 countryTwo := Country(TwoCharCountry)
163 countryThree := Country(ThreeCharCountry)
164
165 if len(countryThree) < 3 {
166 t.Error("countryThree < 3 chars")
167 }
168
169 if !findInSlice(jsonData.Countries, countryFull) {
170 t.Error("Couldnt find country in countries")
171 }
172
173 if !findInSlice(jsonData.CountriesTwoChars, countryTwo) {
174 t.Error("Couldnt find country with two chars in countriesTwoChars")
175 }
176
177 if !findInSlice(jsonData.CountriesThreeChars, countryThree) {
178 t.Error("Couldnt find country with three chars in countriesThreeChars")
179 }
180}
181
182func TestCurrency(t *testing.T) {
183 t.Log("TestCurrency")

Callers

nothing calls this directly

Calls 2

CountryFunction · 0.85
findInSliceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…