| 1227 | |
| 1228 | struct { |
| 1229 | void operator()(Expression expr, Expression expected) { |
| 1230 | ASSERT_OK_AND_ASSIGN(expr, expr.Bind(*kBoringSchema)); |
| 1231 | ASSERT_OK_AND_ASSIGN(expected, expected.Bind(*kBoringSchema)); |
| 1232 | |
| 1233 | ASSERT_OK_AND_ASSIGN(auto folded, FoldConstants(expr)); |
| 1234 | |
| 1235 | EXPECT_EQ(folded, expected); |
| 1236 | ExpectIdenticalIfUnchanged(folded, expr); |
| 1237 | } |
| 1238 | } ExpectFoldsTo; |
| 1239 | |
| 1240 | TEST(Expression, FoldConstants) { |
nothing calls this directly
no test coverage detected