| 81 | }; |
| 82 | |
| 83 | absl::Status RegisterTests(const TestSuite& test_suite, |
| 84 | const std::shared_ptr<TestRunner>& test_runner) { |
| 85 | for (const auto& section : test_suite.sections()) { |
| 86 | for (const TestCase& test_case : section.tests()) { |
| 87 | testing::RegisterTest( |
| 88 | test_suite.name().c_str(), |
| 89 | absl::StrCat(section.name(), "/", test_case.name()).c_str(), nullptr, |
| 90 | nullptr, __FILE__, __LINE__, [&test_runner, test_case]() -> CelTest* { |
| 91 | return new CelTest(test_runner, test_case); |
| 92 | }); |
| 93 | } |
| 94 | } |
| 95 | return absl::OkStatus(); |
| 96 | } |
| 97 | |
| 98 | absl::StatusOr<std::string> ReadFileToString(absl::string_view file_path) { |
| 99 | std::ifstream file_stream{std::string(file_path)}; |