| 1528 | } |
| 1529 | |
| 1530 | TEST_P(ExprTest, NullLiteral) { |
| 1531 | for (int type = TYPE_BOOLEAN; type != TYPE_DATE; ++type) { |
| 1532 | RuntimeState state(TQueryCtx(), ExecEnv::GetInstance()); |
| 1533 | ObjectPool pool; |
| 1534 | MemTracker tracker; |
| 1535 | MemPool mem_pool(&tracker); |
| 1536 | |
| 1537 | NullLiteral expr(static_cast<PrimitiveType>(type)); |
| 1538 | ScalarExprEvaluator* eval; |
| 1539 | EXPECT_OK( |
| 1540 | ScalarExprEvaluator::Create(expr, &state, &pool, &mem_pool, &mem_pool, &eval)); |
| 1541 | EXPECT_OK(eval->Open(&state)); |
| 1542 | EXPECT_TRUE(eval->GetValue(nullptr) == nullptr); |
| 1543 | eval->Close(&state); |
| 1544 | expr.Close(); |
| 1545 | state.ReleaseResources(); |
| 1546 | } |
| 1547 | } |
| 1548 | |
| 1549 | TEST_P(ExprTest, LiteralConstruction) { |
| 1550 | bool b_val = true; |
nothing calls this directly
no test coverage detected