Don't format in t.Error()

This commit is contained in:
Patrick Mylund Nielsen 2012-02-13 21:37:17 +01:00
parent 6660155e6c
commit 39b4f413a1
1 changed files with 6 additions and 6 deletions

View File

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