| 32 | using ::testing::IsTrue; |
| 33 | |
| 34 | TEST(Constant, NullValue) { |
| 35 | Constant const_expr; |
| 36 | EXPECT_THAT(const_expr.has_null_value(), IsFalse()); |
| 37 | const_expr.set_null_value(); |
| 38 | EXPECT_THAT(const_expr.has_null_value(), IsTrue()); |
| 39 | EXPECT_EQ(const_expr.kind().index(), ConstantKindIndexOf<std::nullptr_t>()); |
| 40 | EXPECT_EQ(const_expr.kind_case(), ConstantKindCase::kNull); |
| 41 | } |
| 42 | |
| 43 | TEST(Constant, BoolValue) { |
| 44 | Constant const_expr; |