| 35 | // TypeMatcher |
| 36 | |
| 37 | TEST(TypeMatcher, SameTypeId) { |
| 38 | std::shared_ptr<TypeMatcher> matcher = match::SameTypeId(Type::DECIMAL); |
| 39 | ASSERT_TRUE(matcher->Matches(*decimal128(20, 2))); |
| 40 | ASSERT_FALSE(matcher->Matches(*int8())); |
| 41 | |
| 42 | ASSERT_EQ("Type::DECIMAL128", matcher->ToString()); |
| 43 | |
| 44 | ASSERT_TRUE(matcher->Equals(*matcher)); |
| 45 | ASSERT_TRUE(matcher->Equals(*match::SameTypeId(Type::DECIMAL))); |
| 46 | ASSERT_FALSE(matcher->Equals(*match::SameTypeId(Type::TIMESTAMP))); |
| 47 | } |
| 48 | |
| 49 | TEST(TypeMatcher, TimestampTypeUnit) { |
| 50 | auto matcher = match::TimestampTypeUnit(TimeUnit::MILLI); |
nothing calls this directly
no test coverage detected