TestExpr_expr tests the expr method of all the types in the ast package. Note that this doesn't actually do anything and is just forcing test coverage. The expr func only exists for type safety with the Expr interface.
(t *testing.T)
| 6 | // Note that this doesn't actually do anything and is just forcing test coverage. |
| 7 | // The expr func only exists for type safety with the Expr interface. |
| 8 | func TestExpr_expr(t *testing.T) { |
| 9 | NumberFloatExpr{}.expr() |
| 10 | NumberIntExpr{}.expr() |
| 11 | StringExpr{}.expr() |
| 12 | BoolExpr{}.expr() |
| 13 | BinaryExpr{}.expr() |
| 14 | UnaryExpr{}.expr() |
| 15 | CallExpr{}.expr() |
| 16 | ChainedExpr{}.expr() |
| 17 | SpreadExpr{}.expr() |
| 18 | RangeExpr{}.expr() |
| 19 | IndexExpr{}.expr() |
| 20 | ArrayExpr{}.expr() |
| 21 | PropertyExpr{}.expr() |
| 22 | ObjectExpr{}.expr() |
| 23 | MapExpr{}.expr() |
| 24 | EachExpr{}.expr() |
| 25 | VariableExpr{}.expr() |
| 26 | GroupExpr{}.expr() |
| 27 | ConditionalExpr{}.expr() |
| 28 | BranchExpr{}.expr() |
| 29 | FilterExpr{}.expr() |
| 30 | SearchExpr{}.expr() |
| 31 | RecursiveDescentExpr{}.expr() |
| 32 | SortByExpr{}.expr() |
| 33 | GroupByExpr{}.expr() |
| 34 | ReduceExpr{}.expr() |
| 35 | MapValuesExpr{}.expr() |
| 36 | AnyExpr{}.expr() |
| 37 | AllExpr{}.expr() |
| 38 | CountExpr{}.expr() |
| 39 | AssignExpr{}.expr() |
| 40 | NullExpr{}.expr() |
| 41 | RegexExpr{}.expr() |
| 42 | } |
| 43 | |
| 44 | func TestChainExprs(t *testing.T) { |
| 45 | // 0 args → nil. |