diff --git a/error_test.go b/error_test.go index a006188..1ccbe5b 100644 --- a/error_test.go +++ b/error_test.go @@ -231,6 +231,12 @@ func TestExtendedErrorCodes_Unique(t *testing.T) { t.Errorf("Wrong extended error code: %d != %d", sqliteErr.ExtendedCode, ErrConstraintUnique) } + extended := sqliteErr.Code.Extend(3).Error() + expected := "constraint failed" + if extended != expected { + t.Errorf("Wrong basic error code: %q != %q", + extended, expected) + } } }