Skip to content

Commit

Permalink
tests: add field unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tr1v3r committed Aug 10, 2022
1 parent 01d832d commit f450681
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions field/export_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ func TestExpr_Build(t *testing.T) {
Result: "`t1`.`id` = `t1`.`id` + `t2`.`num`+?",
ExpectedVars: []interface{}{int(1)},
},
{
Expr: field.NewInt("t1", "a").AddCol(field.NewInt("t2", "b").Add(1)).(field.Field).GtCol(field.NewInt("t", "c")),
Result: "`t1`.`a` + `t2`.`b`+? > `t`.`c`",
ExpectedVars: []interface{}{int(1)},
},
// ======================== integer ========================
{
Expr: field.NewUint("", "id"),
Expand Down

0 comments on commit f450681

Please sign in to comment.