| 331 | } |
| 332 | |
| 333 | void TestAssertions::assertError(const GenerateResult& result, |
| 334 | const std::string& expected_error) { |
| 335 | EXPECT_FALSE(result.is_success()) << "Expected error result but got success"; |
| 336 | EXPECT_TRUE(result.error.has_value()) |
| 337 | << "Expected error message in error result"; |
| 338 | if (!expected_error.empty()) { |
| 339 | EXPECT_THAT(result.error_message(), testing::HasSubstr(expected_error)) |
| 340 | << "Error message doesn't contain expected text"; |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | void TestAssertions::assertUsage(const Usage& usage, |
| 345 | int expected_prompt, |
nothing calls this directly
no test coverage detected