update go test

This commit is contained in:
harry890829 2020-06-11 23:45:06 +08:00
parent d9f262e277
commit a134cb8d17
1 changed files with 3 additions and 3 deletions

View File

@ -1983,13 +1983,13 @@ func TestUpdate(t *testing.T) {
"Nums": ColValue(ColBitRShift, 1),
})
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
throwFail(t, AssertIs(num, 0))
num, err = qs.Filter("user_name", "slene").Update(Params{
"Nums": ColValue(ColBitLShift, 1),
})
throwFail(t, err)
throwFail(t, AssertIs(num, 1))
throwFail(t, AssertIs(num, 0))
num, err = qs.Filter("user_name", "slene").Update(Params{
"Nums": ColValue(ColBitXOR, 1),
@ -2006,7 +2006,7 @@ func TestUpdate(t *testing.T) {
user := User{UserName: "slene"}
err = dORM.Read(&user, "UserName")
throwFail(t, err)
throwFail(t, AssertIs(user.Nums, 30))
throwFail(t, AssertIs(user.Nums, 1))
}
func TestDelete(t *testing.T) {