| 157 | } |
| 158 | |
| 159 | TestSuite GetTestSuite() { |
| 160 | std::string test_suite_path = absl::GetFlag(FLAGS_test_suite_path); |
| 161 | if (!test_suite_path.empty()) { |
| 162 | return ReadTestSuiteFromPath(test_suite_path); |
| 163 | } |
| 164 | |
| 165 | // If no test suite path is provided, use the factory function to get the |
| 166 | // test suite after checking if the factory function is empty or not. |
| 167 | std::function<TestSuite()> test_suite_factory = |
| 168 | cel::test::internal::GetCelTestSuiteFactory(); |
| 169 | if (test_suite_factory == nullptr) { |
| 170 | ABSL_LOG(FATAL) |
| 171 | << "No CEL test suite provided. Please provide a test suite using " |
| 172 | "either the bzl macro or the CEL_REGISTER_TEST_SUITE_FACTORY " |
| 173 | "preprocessor macro."; |
| 174 | } |
| 175 | return test_suite_factory(); |
| 176 | } |
| 177 | |
| 178 | void UpdateWithExpressionFromCommandLineFlags( |
| 179 | CelTestContext& cel_test_context) { |
no test coverage detected