diff options
-rw-r--r-- | feed/cveid_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/feed/cveid_test.go b/feed/cveid_test.go index 8df3642..400b1ad 100644 --- a/feed/cveid_test.go +++ b/feed/cveid_test.go @@ -43,7 +43,7 @@ func TestParseCveIdYear(t *testing.T) { } { { "0000", "year out of bounds: 0000" }, { "0001", "year out of bounds: 0001" }, - { "1999", "year out of bounds: 1999" }, + { "1998", "year out of bounds: 1998" }, { "2128", "year out of bounds: 2128" }, { "9999", "year out of bounds: 9999" }, } @@ -136,7 +136,7 @@ func TestNewCveId(t *testing.T) { exp string } { { "CVE-0000-1234", "year out of bounds: 0000" }, - { "CVE-1999-1234", "year out of bounds: 1999" }, + { "CVE-1998-1234", "year out of bounds: 1998" }, { "CVE-2128-1234", "year out of bounds: 2128" }, { "CVE-9999-1234", "year out of bounds: 9999" }, } @@ -170,10 +170,10 @@ func TestNewCveId(t *testing.T) { } goodTests := []string { - "CVE-2000-0", - "CVE-2127-0", - "CVE-2000-33554431", - "CVE-2127-33554431", + "CVE-1999-0", + "CVE-2126-0", + "CVE-1999-33554431", + "CVE-2126-33554431", } for _, val := range(goodTests) { @@ -185,7 +185,7 @@ func TestNewCveId(t *testing.T) { } } func TestCveIdYear(t *testing.T) { - for year := 2000; year < 2127; year++ { + for year := 1999; year < 2126; year++ { t.Run(strconv.FormatInt(int64(year), 10), func(t *testing.T) { // expected value exp := uint16(year) @@ -260,12 +260,12 @@ func TestCveIdUnmarshalValid(t *testing.T) { expNum uint32 exp string } { - { "\"CVE-2000-0\"", 2000, 0, "CVE-2000-0000" }, - { "\"CVE-2000-1234\"", 2000, 1234, "CVE-2000-1234" }, - { "\"CVE-2000-33554431\"", 2000, 33554431, "CVE-2000-33554431" }, - { "\"CVE-2127-0\"", 2127, 0, "CVE-2127-0000" }, - { "\"CVE-2127-1234\"", 2127, 1234, "CVE-2127-1234" }, - { "\"CVE-2127-33554431\"", 2127, 33554431, "CVE-2127-33554431" }, + { "\"CVE-1999-0\"", 1999, 0, "CVE-1999-0000" }, + { "\"CVE-1999-1234\"", 1999, 1234, "CVE-1999-1234" }, + { "\"CVE-1999-33554431\"", 1999, 33554431, "CVE-1999-33554431" }, + { "\"CVE-2126-0\"", 2126, 0, "CVE-2126-0000" }, + { "\"CVE-2126-1234\"", 2126, 1234, "CVE-2126-1234" }, + { "\"CVE-2126-33554431\"", 2126, 33554431, "CVE-2126-33554431" }, } for _, test := range(tests) { |