| 235 | class BenchmarkCaseTest : public testing::TestWithParam<TestInfo> {}; |
| 236 | |
| 237 | TEST_P(BenchmarkCaseTest, ExpectedResult) { |
| 238 | std::vector<Macro> macros = Macro::AllMacros(); |
| 239 | macros.push_back(cel::OptMapMacro()); |
| 240 | macros.push_back(cel::OptFlatMapMacro()); |
| 241 | const TestInfo& test_info = GetParam(); |
| 242 | ParserOptions options; |
| 243 | options.enable_optional_syntax = true; |
| 244 | options.enable_quoted_identifiers = true; |
| 245 | |
| 246 | auto result = EnrichedParse(test_info.expr, macros, "<input>", options); |
| 247 | switch (test_info.result) { |
| 248 | case ParseResult::kSuccess: |
| 249 | ASSERT_THAT(result, IsOk()); |
| 250 | break; |
| 251 | case ParseResult::kError: |
| 252 | ASSERT_THAT(result, Not(IsOk())); |
| 253 | break; |
| 254 | } |
| 255 | } |
| 256 | |
| 257 | INSTANTIATE_TEST_SUITE_P(CelParserTest, BenchmarkCaseTest, |
| 258 | testing::ValuesIn(GetTestCases())); |
nothing calls this directly
no test coverage detected