Fix transposed test number: +61 423 274 487 (61423274487) everywhere

This commit is contained in:
2026-08-07 16:17:55 +10:00
parent d4679068ba
commit 0dbf728f00
8 changed files with 17 additions and 17 deletions

View File

@@ -5,8 +5,8 @@ import "strings"
// NormalizeAU normalises a phone number to international AU format without a
// leading '+' or zero:
//
// "+61432374487" -> "61432374487"
// "0432374487" -> "61432374487"
// "+61423274487" -> "61423274487"
// "0432374487" -> "61423274487"
func NormalizeAU(phone string) string {
s := strings.Map(func(r rune) rune {
if r >= '0' && r <= '9' {

View File

@@ -37,11 +37,11 @@ func TestHaversineMeters(t *testing.T) {
func TestNormalizeAU(t *testing.T) {
cases := []struct{ in, want string }{
{"+61432374487", "61432374487"},
{"0432374487", "61432374487"},
{"61432374487", "61432374487"},
{"+61 432 374 487", "61432374487"},
{"(04) 3237 4487", "61432374487"},
{"+61423274487", "61423274487"},
{"0423274487", "61423274487"},
{"61423274487", "61423274487"},
{"+61 423 274 487", "61423274487"},
{"0423 274 487", "61423274487"},
{"", ""},
}
for _, tc := range cases {