From bf5ac690d6339a82f259278cb11a3dc00ff1b229 Mon Sep 17 00:00:00 2001 From: joeybloggs Date: Tue, 2 Feb 2016 08:37:11 -0500 Subject: [PATCH] Add a couple more test cases --- validator_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/validator_test.go b/validator_test.go index 9b077dc..63f3d9b 100644 --- a/validator_test.go +++ b/validator_test.go @@ -1993,6 +1993,7 @@ func TestTCPAddrValidation(t *testing.T) { param string expected bool }{ + {"", false}, {":80", false}, {"127.0.0.1:80", true}, {"[::1]:80", true}, @@ -2024,6 +2025,7 @@ func TestTCP6AddrValidation(t *testing.T) { param string expected bool }{ + {"", false}, {":80", false}, {"127.0.0.1:80", false}, {"[::1]:80", true}, @@ -2055,6 +2057,7 @@ func TestTCP4AddrValidation(t *testing.T) { param string expected bool }{ + {"", false}, {":80", false}, {"127.0.0.1:80", true}, {"[::1]:80", false}, // https://github.com/golang/go/issues/14037 @@ -2087,6 +2090,7 @@ func TestUDPAddrValidation(t *testing.T) { param string expected bool }{ + {"", false}, {":80", false}, {"127.0.0.1:80", true}, {"[::1]:80", true}, @@ -2118,6 +2122,7 @@ func TestUDP6AddrValidation(t *testing.T) { param string expected bool }{ + {"", false}, {":80", false}, {"127.0.0.1:80", false}, {"[::1]:80", true}, @@ -2149,6 +2154,7 @@ func TestUDP4AddrValidation(t *testing.T) { param string expected bool }{ + {"", false}, {":80", false}, {"127.0.0.1:80", true}, {"[::1]:80", false}, // https://github.com/golang/go/issues/14037