Don't format in t.Error()

master
Patrick Mylund Nielsen 13 years ago
parent 6660155e6c
commit 39b4f413a1

@ -417,12 +417,12 @@ func TestIncrementOverflowInt(t *testing.T) {
tc.Set("int8", int8(127), 0)
err := tc.Increment("int8", 1)
if err != nil {
t.Error("Error incrementing int8: %s", err)
t.Error("Error incrementing int8:", err)
}
x, _ := tc.Get("int8")
int8 := x.(int8)
if int8 != -128 {
t.Error("int8 did not overflow as expected; value: %d", int8)
t.Error("int8 did not overflow as expected; value:", int8)
}
}
@ -432,12 +432,12 @@ func TestIncrementOverflowUint(t *testing.T) {
tc.Set("uint8", uint8(255), 0)
err := tc.Increment("uint8", 1)
if err != nil {
t.Error("Error incrementing int8: %s", err)
t.Error("Error incrementing int8:", err)
}
x, _ := tc.Get("uint8")
uint8 := x.(uint8)
if uint8 != 0 {
t.Error("uint8 did not overflow as expected; value: %d", uint8)
t.Error("uint8 did not overflow as expected; value:", uint8)
}
}
@ -446,12 +446,12 @@ func TestDecrementUnderflowUint(t *testing.T) {
tc.Set("uint8", uint8(0), 0)
err := tc.Decrement("uint8", 1)
if err != nil {
t.Error("Error decrementing int8: %s", err)
t.Error("Error decrementing int8:", err)
}
x, _ := tc.Get("uint8")
uint8 := x.(uint8)
if uint8 != 255 {
t.Error("uint8 did not underflow as expected; value: %d", uint8)
t.Error("uint8 did not underflow as expected; value:", uint8)
}
}

Loading…
Cancel
Save