MCPcopy Create free account
hub / github.com/3rdparty/libprocess / AwaitAssertResponseStatusEq

Function AwaitAssertResponseStatusEq

include/process/gtest.hpp:414–439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412
413
414inline ::testing::AssertionResult AwaitAssertResponseStatusEq(
415 const char* expectedExpr,
416 const char* actualExpr,
417 const char* durationExpr,
418 const std::string& expected,
419 const process::Future<process::http::Response>& actual,
420 const Duration& duration)
421{
422 const ::testing::AssertionResult result =
423 AwaitAssertReady(actualExpr, durationExpr, actual, duration);
424
425 if (result) {
426 if (expected == actual->status) {
427 return ::testing::AssertionSuccess();
428 } else {
429 return ::testing::AssertionFailure()
430 << "Value of: (" << actualExpr << ")->status\n"
431 << " Actual: " << ::testing::PrintToString(actual->status) << "\n"
432 << "Expected: " << expectedExpr << "\n"
433 << "Which is: " << ::testing::PrintToString(expected) << "\n"
434 << " Body: " << ::testing::PrintToString(actual->body);
435 }
436 }
437
438 return result;
439}
440
441
442#define AWAIT_ASSERT_RESPONSE_STATUS_EQ_FOR(expected, actual, duration) \

Callers

nothing calls this directly

Calls 1

AwaitAssertReadyFunction · 0.85

Tested by

no test coverage detected