From 94b148ccdcb88f2544c222f73f5c734ac78ccd96 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Mon, 31 Jan 2022 23:28:22 -0500 Subject: internal/cvss: more tests --- internal/cvss/v3key_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'internal/cvss/v3key_test.go') diff --git a/internal/cvss/v3key_test.go b/internal/cvss/v3key_test.go index ccf2b8f..517eebd 100644 --- a/internal/cvss/v3key_test.go +++ b/internal/cvss/v3key_test.go @@ -122,3 +122,21 @@ func TestV3KeyCategory(t *testing.T) { }) } } + +func TestInvalidV3KeyName(t *testing.T) { + exp := "invalid" + got := v3Key(255).Name() + + if got != exp { + t.Errorf("got: \"%s\", exp: \"%s\"", got, exp) + } +} + +func TestInvalidV3KeyCategory(t *testing.T) { + exp := InvalidCategory + got := v3Key(255).Category() + + if got != exp { + t.Errorf("got: \"%s\", exp: \"%s\"", got, exp) + } +} -- cgit v1.2.3