add validation error type, fix tests, add number tests

This commit is contained in:
Aneurin Barker Snook
2023-11-19 20:27:33 +00:00
parent 2f895b1fc6
commit 6b3a2377a7
+2 -1
View File
@@ -1,6 +1,7 @@
package registry
import (
"errors"
"testing"
)
@@ -24,7 +25,7 @@ func TestRegistry(t *testing.T) {
t.Logf("(%d) Testing set %s=%q (lock: %t)", i, tc.Key, tc.Value, tc.Lock)
err := r.Set(tc.Key, tc.Value)
if err != tc.Err {
if !errors.Is(err, tc.Err) {
t.Errorf("Expected error %v, got %v", tc.Err, err)
}