From bdc47bd6e2d10a8a102cdaa2ed7431d6796d5b99 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Thu, 28 Dec 2017 11:42:09 +1100 Subject: [PATCH] Save the "t" name for the token package --- lang/ast/string_test.go | 8 +++---- lang/base38/base38_test.go | 22 +++++++++---------- lang/check/check_test.go | 44 +++++++++++++++++++------------------- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/lang/ast/string_test.go b/lang/ast/string_test.go index 399e9159..dbc3f873 100644 --- a/lang/ast/string_test.go +++ b/lang/ast/string_test.go @@ -21,7 +21,7 @@ import ( "github.com/google/wuffs/lang/token" ) -func TestString(t *testing.T) { +func TestString(tt *testing.T) { const filename = "test.wuffs" testCases := []string{ "1", @@ -74,17 +74,17 @@ func TestString(t *testing.T) { for _, tc := range testCases { tokens, _, err := token.Tokenize(tm, filename, []byte(tc)) if err != nil { - t.Errorf("Tokenize(%q): %v", tc, err) + tt.Errorf("Tokenize(%q): %v", tc, err) continue } expr, err := parse.ParseExpr(tm, filename, tokens, nil) if err != nil { - t.Errorf("ParseExpr(%q): %v", tc, err) + tt.Errorf("ParseExpr(%q): %v", tc, err) continue } got := expr.Str(tm) if got != tc { - t.Errorf("got %q, want %q", got, tc) + tt.Errorf("got %q, want %q", got, tc) continue } } diff --git a/lang/base38/base38_test.go b/lang/base38/base38_test.go index fff29257..d35dd7c0 100644 --- a/lang/base38/base38_test.go +++ b/lang/base38/base38_test.go @@ -18,25 +18,25 @@ import ( "testing" ) -func TestMax(t *testing.T) { +func TestMax(tt *testing.T) { if Max == 38*38*38*38-1 { return } - t.Fatal("Max does not satisfy its definition") + tt.Fatal("Max does not satisfy its definition") } -func TestMaxBits(t *testing.T) { +func TestMaxBits(tt *testing.T) { if (1<<(MaxBits-1) <= Max) && (Max < 1< Max || got > 1<