Merge pull request #37 from logic/intrune-tests

Correct a few format string issues
This commit is contained in:
Florian 2018-03-15 06:10:53 +01:00 committed by GitHub
commit 3c06908149
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ import "testing"
func Test_RuneToIntIntToRune(t *testing.T) { func Test_RuneToIntIntToRune(t *testing.T) {
if IntToRune(0) != '0' { if IntToRune(0) != '0' {
t.Errorf("failed IntToRune(0) returned %d", string(IntToRune(0))) t.Errorf("failed IntToRune(0) returned %d", IntToRune(0))
} }
if IntToRune(9) != '9' { if IntToRune(9) != '9' {
t.Errorf("failed IntToRune(9) returned %d", IntToRune(9)) t.Errorf("failed IntToRune(9) returned %d", IntToRune(9))
@ -13,12 +13,12 @@ func Test_RuneToIntIntToRune(t *testing.T) {
t.Errorf("failed IntToRune(10) returned %d", IntToRune(10)) t.Errorf("failed IntToRune(10) returned %d", IntToRune(10))
} }
if RuneToInt('0') != 0 { if RuneToInt('0') != 0 {
t.Error("failed RuneToInt('0') returned %d", RuneToInt(0)) t.Errorf("failed RuneToInt('0') returned %d", RuneToInt(0))
} }
if RuneToInt('9') != 9 { if RuneToInt('9') != 9 {
t.Error("failed RuneToInt('9') returned %d", RuneToInt(9)) t.Errorf("failed RuneToInt('9') returned %d", RuneToInt(9))
} }
if RuneToInt('F') != -1 { if RuneToInt('F') != -1 {
t.Error("failed RuneToInt('F') returned %d", RuneToInt('F')) t.Errorf("failed RuneToInt('F') returned %d", RuneToInt('F'))
} }
} }