MCPcopy Create free account
hub / github.com/ClickHouse/ai-sdk-cpp / assertError

Method assertError

tests/utils/test_fixtures.cpp:333–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333void 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
344void TestAssertions::assertUsage(const Usage& usage,
345 int expected_prompt,

Callers

nothing calls this directly

Calls 2

is_successMethod · 0.45
error_messageMethod · 0.45

Tested by

no test coverage detected