Add test for ErrNo.Extend()
This commit is contained in:
parent
9c64e666d6
commit
a528a30852
|
@ -231,6 +231,12 @@ func TestExtendedErrorCodes_Unique(t *testing.T) {
|
||||||
t.Errorf("Wrong extended error code: %d != %d",
|
t.Errorf("Wrong extended error code: %d != %d",
|
||||||
sqliteErr.ExtendedCode, ErrConstraintUnique)
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue