Expect misc.timezone weighted so a territory's populous zones win the draw

This commit is contained in:
2026-09-18 23:33:52 +02:00
parent 85d4760cde
commit 710b6b0261
2 changed files with 8 additions and 0 deletions
+7
View File
@@ -738,6 +738,13 @@ func TestShippedTables(t *testing.T) {
t.Fatalf("%q: a territory and a timezone in one render disagree on the territory", got)
}
}
zones := map[string]int{}
for i := 0; i < 2000; i++ {
zones[fake(t, f, "territory[US].timezone")]++
}
if peopled := zones["America/New_York"] + zones["America/Chicago"] + zones["America/Los_Angeles"] + zones["America/Denver"]; peopled < 1600 {
t.Fatalf("the four zones most Americans live in take %d of 2000 US draws, want the population weight to favour them", peopled)
}
}
// TestEveryTerritoryNamesAShippedCountry proves what no parent can: the sovereign a