Skip to content

Commit

Permalink
test(lex): fix static check warning literalloopclosure (#18)
Browse files Browse the repository at this point in the history
* test(lex): fix literalloopclosure

Signed-off-by: Nico Braun <[email protected]>

* fixup! test(lex): fix literalloopclosure

---------

Signed-off-by: Nico Braun <[email protected]>
Co-authored-by: Jim <[email protected]>
  • Loading branch information
bluebrown and jimlambrt committed Sep 2, 2023
1 parent ecd2841 commit 98de2aa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ func Test_lexKeywordState(t *testing.T) {
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)

Expand Down Expand Up @@ -220,6 +221,7 @@ func Test_lexWhitespaceState(t *testing.T) {
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
assert, require := assert.New(t), require.New(t)
Expand Down
1 change: 1 addition & 0 deletions mql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func TestParse(t *testing.T) {
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
whereClause, err := mql.Parse(tc.query, tc.model, tc.opts...)
Expand Down
1 change: 1 addition & 0 deletions mql_unexported_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func Test_exprToWhereClause(t *testing.T) {
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
whereClause, err := exprToWhereClause(tc.expr, tc.validators, tc.opt...)
Expand Down
1 change: 1 addition & 0 deletions parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ func Test_parser(t *testing.T) {
},
}
for _, tc := range tests {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
p := newParser(tc.raw)
Expand Down
4 changes: 2 additions & 2 deletions tests/postgres/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func Test_postgres(t *testing.T) {
},
}
for _, tc := range tests {
testName := tc.name
t.Run(testName, func(t *testing.T) {
tc := tc
t.Run(tc.name, func(t *testing.T) {
assert, require := assert.New(t), require.New(t)
where, err := mql.Parse(tc.query, user{}, tc.opts...)
if tc.wantErrContains != "" {
Expand Down

0 comments on commit 98de2aa

Please sign in to comment.