| 788 | } |
| 789 | |
| 790 | bool SC::TestCase::test_section(StringSpan sectionName, Execute execution) |
| 791 | { |
| 792 | numSectionTestsFailed = 0; |
| 793 | bool isTestEnabled; |
| 794 | switch (execution) |
| 795 | { |
| 796 | case Execute::Default: // |
| 797 | isTestEnabled = report.isTestEnabled(testName) and report.isSectionEnabled(sectionName); |
| 798 | break; |
| 799 | case Execute::OnlyExplicit: // |
| 800 | isTestEnabled = report.sectionToRun == sectionName; |
| 801 | break; |
| 802 | default: return false; |
| 803 | } |
| 804 | if (isTestEnabled) |
| 805 | { |
| 806 | SC_TESTING_ASSERT_DEBUG(sectionName.isNullTerminated()); |
| 807 | if (not report.currentSection.isEmpty()) |
| 808 | { |
| 809 | report.printSectionResult(*this); |
| 810 | } |
| 811 | report.currentSection = sectionName; |
| 812 | return true; |
| 813 | } |
| 814 | else |
| 815 | { |
| 816 | report.currentSection = StringSpan(); |
| 817 | return false; |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | void SC::TestReport::printSectionResult(TestCase& testCase) |
| 822 | { |
nothing calls this directly
no test coverage detected