MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / recordExpectation

Method recordExpectation

Libraries/Testing/Testing.cpp:751–781  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

749}
750
751bool SC::TestCase::recordExpectation(StringSpan expression, bool status, StringSpan detailedError)
752{
753 SC_TESTING_ASSERT_DEBUG(expression.isNullTerminated());
754 if (status)
755 {
756 numTestsSucceeded++;
757 }
758 else
759 {
760 numSectionTestsFailed++;
761 numTestsFailed++;
762 report.printSectionResult(*this);
763 printedSection = true;
764 report.console.print("\t\t");
765 report.console.print(redEMOJI);
766 if (detailedError.isEmpty())
767 {
768 report.console.print(" [FAIL] {}\n", expression);
769 }
770 else
771 {
772 report.console.print(" [FAIL] {} - Error: {}\n", expression, detailedError);
773 }
774 report.console.flush();
775 if (report.firstFailedTest.isEmpty())
776 {
777 report.firstFailedTest = expression;
778 }
779 }
780 return status;
781}
782
783bool SC::TestCase::recordExpectation(StringSpan expression, Result status)
784{

Callers 15

onClientMethod · 0.80
onConnectedMethod · 0.80
onErrorMethod · 0.80
onPayloadMethod · 0.80
onDataMethod · 0.80
cleanupMethod · 0.80
onTimeoutMethod · 0.80
onPayloadMethod · 0.80
onDataMethod · 0.80
cleanupMethod · 0.80

Calls 6

StringSpanFunction · 0.85
isNullTerminatedMethod · 0.80
printSectionResultMethod · 0.80
printMethod · 0.80
flushMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected