From dcabc04bafa409ece9c72bd55b1233fd01f7e06b Mon Sep 17 00:00:00 2001
From: jcajka <jcajka@users.noreply.github.com>
Date: Mon, 5 Feb 2018 16:45:55 +0100
Subject: [PATCH] Make tests pass with go1.10 avoiding following failures:
(#86)
i18n/translations_test.go:66: Error call has possible formatting directive %v
FAIL _/root/go-i18n/i18n [build failed]
i18n/language/pluralspec_test.go:73: Errorf format %q has arg spec of wrong type *language.PluralSpec
FAIL _/root/go-i18n/i18n/language [build failed]
---
i18n/language/pluralspec_test.go | 2 +-
i18n/translations_test.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/i18n/language/pluralspec_test.go b/i18n/language/pluralspec_test.go
index 51c1685..e31cfb7 100644
--- a/i18n/language/pluralspec_test.go
+++ b/i18n/language/pluralspec_test.go
@@ -70,7 +70,7 @@ func TestGetPluralSpec(t *testing.T) {
for _, test := range tests {
spec := GetPluralSpec(test.src)
if spec != test.spec {
- t.Errorf("getPluralSpec(%q) = %q expected %q", test.src, spec, test.spec)
+ t.Errorf("getPluralSpec(%v) = %v expected %v", test.src, spec, test.spec)
}
}
}
diff --git a/i18n/translations_test.go b/i18n/translations_test.go
index 86c5808..ba1a21b 100644
--- a/i18n/translations_test.go
+++ b/i18n/translations_test.go
@@ -63,7 +63,7 @@ func testFile(t *testing.T, path string) {
got := T(tc.id, args...)
if got != tc.want {
- t.Error("got: %v; want: %v", got, tc.want)
+ t.Errorf("got: %v; want: %v", got, tc.want)
}
}
}