aboutsummaryrefslogtreecommitdiff
path: root/types/namespace_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'types/namespace_test.go')
-rw-r--r--types/namespace_test.go24
1 files changed, 12 insertions, 12 deletions
diff --git a/types/namespace_test.go b/types/namespace_test.go
index cd151d8..c38d295 100644
--- a/types/namespace_test.go
+++ b/types/namespace_test.go
@@ -76,6 +76,18 @@ func TestFingerprint(t *testing.T) {
}
}
+func TestVerify(t *testing.T) {
+ var tests []testCaseNamespace
+ tests = append(tests, test_cases_verify(t)...)
+ tests = append(tests, test_cases_verify_ed25519v1(t)...)
+ for _, table := range tests {
+ err := table.namespace.Verify(table.msg, table.sig)
+ if got, want := err != nil, table.wantErr; got != want {
+ t.Errorf("got error=%v but wanted %v in test %q: %v", got, want, table.description, err)
+ }
+ }
+}
+
func TestNewNamespaceEd25519V1(t *testing.T) {
size := 32 // verification key size
for _, table := range []struct {
@@ -110,18 +122,6 @@ func TestNewNamespaceEd25519V1(t *testing.T) {
}
}
-func TestVerify(t *testing.T) {
- var tests []testCaseNamespace
- tests = append(tests, test_cases_verify(t)...)
- tests = append(tests, test_cases_verify_ed25519v1(t)...)
- for _, table := range tests {
- err := table.namespace.Verify(table.msg, table.sig)
- if got, want := err != nil, table.wantErr; got != want {
- t.Errorf("got error=%v but wanted %v in test %q: %v", got, want, table.description, err)
- }
- }
-}
-
// testCaseNamespace is a common test case used for Namespace.Verify() tests
type testCaseNamespace struct {
description string