diff options
Diffstat (limited to 'internal/cvss/v2key_test.go')
-rw-r--r-- | internal/cvss/v2key_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/internal/cvss/v2key_test.go b/internal/cvss/v2key_test.go index 76a3d79..a54f4e7 100644 --- a/internal/cvss/v2key_test.go +++ b/internal/cvss/v2key_test.go @@ -96,3 +96,21 @@ func TestV2KeyCategory(t *testing.T) { }) } } + +func TestInvalidV2KeyName(t *testing.T) { + exp := "invalid" + got := v2Key(255).Name() + + if got != exp { + t.Errorf("got: \"%s\", exp: \"%s\"", got, exp) + } +} + +func TestInvalidV2KeyCategory(t *testing.T) { + exp := InvalidCategory + got := v2Key(255).Category() + + if got != exp { + t.Errorf("got: \"%s\", exp: \"%s\"", got, exp) + } +} |