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

Function TestPostalCode

postalcodes_test.go:45–56  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestPostalCode(t *testing.T) {
46 for _, pt := range postalcodeTests {
47 code := PostalCode(pt.Country)
48
49 if len(code) == pt.Size {
50 continue
51 }
52
53 t.Fatalf("Invalid length for country %q: Expected %d, have %d.",
54 pt.Country, pt.Size, len(code))
55 }
56}
57
58func TestPostalCodeFormat(t *testing.T) {
59

Callers

nothing calls this directly

Calls 1

PostalCodeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…