1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-25 22:11:29 +00:00

update go test

This commit is contained in:
harry890829 2020-06-11 23:45:06 +08:00
parent d9f262e277
commit a134cb8d17

View File

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