mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Save the "t" name for the token package
This commit is contained in:
1 parent
8b0c63df09
commit
bdc47bd6e2
3 files changed
+37
-37
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user