| 1 | #cxx . . $ `<file>/tests/text_reporter_tests.c`/include <cgreen/breadcrumb.h>cxx . . $ `<file>/include/cgreen/breadcrumb.h`/ |
| 2 | #include <cgreen/cgreen.h>cxx . . $ `<file>/include/cgreen/cgreen.h`/ |
| 3 | #include <cgreen/messaging.h>cxx . . $ `<file>/include/cgreen/messaging.h`/ |
| 4 | |
| 5 | #include <stdio.h> |
| 6 | #include <string.h> |
| 7 | |
| 8 | #ifdef __cpluspluscxx . . $ `<built-in>:440:9`! |
| 9 | using namespace cgreen; |
| 10 | #endif |
| 11 | |
| 12 | |
| 13 | #include <cgreen/text_reporter.h>cxx . . $ `<file>/include/cgreen/text_reporter.h`/ |
| 14 | #include "src/text_reporter_internal.h"cxx . . $ `<file>/src/text_reporter_internal.h`/ |
| 15 | |
| 16 | |
| 17 | |
| 18 | static const int linecxx . . $ line.=666; |
| 19 | static char *outputcxx . . $ output. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!; |
| 20 | |
| 21 | static void clear_outputcxx . . $ clear_output(49f6e7a06ebc5aa8).(void) |
| 22 | { |
| 23 | if (NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`! != outputcxx . . $ output.) { |
| 24 | freecxx . . $ free(5d22bdacc48458e8).(outputcxx . . $ output.); |
| 25 | } |
| 26 | |
| 27 | outputcxx . . $ output. = (char*)malloccxx . . $ malloc(bfcfa4d6b7f7ef64).(1); |
| 28 | *outputcxx . . $ output. = '\0'; |
| 29 | } |
| 30 | |
| 31 | static char *concatcxx . . $ concat(5bd1a890f71b1efd).(char *output, char *buffer) { |
| 32 | output = (char *) realloccxx . . $ realloc(417ab160f6baadc6).(output, strlencxx . . $ strlen(751346f8406fd082).(output)+strlencxx . . $ strlen(751346f8406fd082).(buffer)+1); |
| 33 | strcatcxx . . $ strcat(b7b3a83273496486).(output, buffer); |
| 34 | return output; |
| 35 | } |
| 36 | |
| 37 | static int mocked_vprintercxx . . $ mocked_vprinter(5c80dbd47e6ebfbb).(const char *format, va_listcxx . . $ va_list# ap) { |
| 38 | char buffer[10000]; |
| 39 | |
| 40 | vsnprintfcxx . . $ vsnprintf(a85eea89d1bd834f).(buffer, sizeof(buffer), format, ap); |
| 41 | |
| 42 | outputcxx . . $ output. = concatcxx . . $ concat(5bd1a890f71b1efd).(outputcxx . . $ output., buffer); |
| 43 | return strlencxx . . $ strlen(751346f8406fd082).(outputcxx . . $ output.); |
| 44 | } |
| 45 | |
| 46 | static int mocked_printercxx . . $ mocked_printer(581fddd72a8db8fc).(const char *format, ...) { |
| 47 | int result = 0; |
| 48 | |
| 49 | va_listcxx . . $ va_list# ap; |
| 50 | va_startcxx . . $ `<external>/8293021631987149590/stdarg.h:51:9`!(ap, format); |
| 51 | result = mocked_vprintercxx . . $ mocked_vprinter(5c80dbd47e6ebfbb).(format, ap); |
| 52 | va_endcxx . . $ `<external>/8293021631987149590/stdarg.h:53:9`!(ap); |
| 53 | |
| 54 | return result; |
| 55 | } |
| 56 | |
| 57 | static TestReportercxx . . $ TestReporter# *reportercxx . . $ reporter.; |
| 58 | |
| 59 | |
| 60 | static void text_reporter_tests_setupcxx . . $ text_reporter_tests_setup(49f6e7a06ebc5aa8).(void) { |
| 61 | reportercxx . . $ reporter. = create_text_reportercxx . . $ create_text_reporter(a6a8ef953e197a65).(); |
| 62 | |
| 63 | // We can not use setup_reporting() since we are running |
| 64 | // inside a test suite which needs the real reporting |
| 65 | // So we'll have to set up the messaging explicitly |
| 66 | reportercxx . . $ reporter.->ipccxx . . $ TestReporter_#ipc. = start_cgreen_messagingcxx . . $ start_cgreen_messaging(7864480464b09eea).(666); |
| 67 | |
| 68 | clear_outputcxx . . $ clear_output(49f6e7a06ebc5aa8).(); |
| 69 | set_text_reporter_printercxx . . $ set_text_reporter_printer(ecb5d6da6d3395c).(reportercxx . . $ reporter., mocked_printercxx . . $ mocked_printer(581fddd72a8db8fc).); |
| 70 | set_text_reporter_vprintercxx . . $ set_text_reporter_vprinter(6046060cadba98d3).(reportercxx . . $ reporter., mocked_vprintercxx . . $ mocked_vprinter(5c80dbd47e6ebfbb).); |
| 71 | } |
| 72 | |
| 73 | static void text_reporter_tests_teardowncxx . . $ text_reporter_tests_teardown(49f6e7a06ebc5aa8).(void) { |
| 74 | reportercxx . . $ reporter.->destroycxx . . $ TestReporter_#destroy.(reportercxx . . $ reporter.); |
| 75 | |
| 76 | // bad mojo when running tests in same process, as destroy_reporter |
| 77 | // also sets context.reporter = NULL, thus breaking the next test |
| 78 | // to run |
| 79 | if (outputcxx . . $ output. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!) { |
| 80 | freecxx . . $ free(5d22bdacc48458e8).(outputcxx . . $ output.); |
| 81 | // need to set output to NULL to avoid second free in |
| 82 | // subsequent call to setup_*_reporter_tests->clear_output when |
| 83 | // running tests in same process |
| 84 | outputcxx . . $ output. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!; |
| 85 | } |
| 86 | } |
| 87 | |
| 88 | |
| 89 | Describecxx . . $ setupTextReporter(49f6e7a06ebc5aa8).(TextReporter); |
| 90 | BeforeEachcxx . . $ `include/cgreen/unit.h:15:9`!(TextReporter) { |
| 91 | text_reporter_tests_setupcxx . . $ text_reporter_tests_setup(49f6e7a06ebc5aa8).(); |
| 92 | } |
| 93 | AfterEachcxx . . $ AfterEach_For_TextReporter.(TextReporter) { |
| 94 | text_reporter_tests_teardowncxx . . $ text_reporter_tests_teardown(49f6e7a06ebc5aa8).(); |
| 95 | } |
| 96 | |
| 97 | Ensurecxx . . $ CgreenTest#(TextReporter, will_report_beginning_and_end_of_suites) { |
| 98 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "suite_name", 2); |
| 99 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); |
| 100 | assert_thatcxx . . $ `include/cgreen/assertions.h:30:9`!(output, begins_with_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:45:9`!("Running \"suite_name\" (2 tests)")); |
| 101 | assert_thatcxx . . $ cgreen/assert_that_(b064aa216885589).(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("Completed \"suite_name\"")); |
| 102 | } |
| 103 | |
| 104 | |
| 105 | Ensurecxx . . $ contextForTextReporter.(TextReporter, will_report_passed_for_test_with_one_pass_on_completion) { |
| 106 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "suite_name", 15); |
| 107 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "test_name"); |
| 108 | |
| 109 | (*reportercxx . . $ reporter.->assert_truecxx . . $ TestReporter_#assert_true.)(reportercxx . . $ reporter., "file", 2, truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!, ""); |
| 110 | |
| 111 | // Must indicate test case completion before calling finish_test() |
| 112 | send_reporter_completion_notificationcxx . . $ send_reporter_completion_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 113 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!); |
| 114 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); |
| 115 | |
| 116 | assert_thatcxx . . $ `include/cgreen/assertions.h:30:9`!(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("Completed \"suite_name\": 1 pass")); |
| 117 | } |
| 118 | |
| 119 | Ensurecxx . . $ `include/cgreen/unit.h:25:9`!(TextReporter, will_report_no_asserts_for_suites_with_no_asserts) { |
| 120 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "suite_name", 15); |
| 121 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "test_name"); |
| 122 | |
| 123 | // Must indicate test case completion before calling finish_test() |
| 124 | send_reporter_completion_notificationcxx . . $ send_reporter_completion_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 125 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!); |
| 126 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); |
| 127 | |
| 128 | assert_thatcxx . . $ cgreen/assert_that_(b064aa216885589).(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("Completed \"suite_name\": No assertions")); |
| 129 | } |
| 130 | |
| 131 | |
| 132 | Ensurecxx . . $ CgreenTest#(TextReporter, will_report_failed_once_for_each_fail) { |
| 133 | va_listcxx . . $ va_list# arguments; |
| 134 | |
| 135 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "test_name"); |
| 136 | |
| 137 | reportercxx . . $ reporter.->failurescxx . . $ TestReporter_#failures.++; // Simulating a failed assert |
| 138 | memsetcxx . . $ memset(d1de1e4fb215f1c6).(&arguments, 0, sizeof(va_listcxx . . $ va_list#)); |
| 139 | reportercxx . . $ reporter.->show_failcxx . . $ TestReporter_#show_fail.(reportercxx . . $ reporter., "file", 2, "test_name", arguments); |
| 140 | |
| 141 | assert_thatcxx . . $ `include/cgreen/assertions.h:30:9`!(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("file:2: Failure")); |
| 142 | clear_outputcxx . . $ clear_output(49f6e7a06ebc5aa8).(); |
| 143 | |
| 144 | reportercxx . . $ reporter.->failurescxx . . $ TestReporter_#failures.++; // Simulating another failed assert |
| 145 | reportercxx . . $ reporter.->show_failcxx . . $ TestReporter_#show_fail.(reportercxx . . $ reporter., "file", 3, "test_name", arguments); |
| 146 | assert_thatcxx . . $ cgreen/(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("file:3: Failure:")); |
| 147 | clear_outputcxx . . $ clear_output(49f6e7a06ebc5aa8).(); |
| 148 | |
| 149 | // Must indicate test case completion before calling finish_test() |
| 150 | send_reporter_completion_notificationcxx . . $ send_reporter_completion_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 151 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!); |
| 152 | assert_thatcxx . . $ cgreen/(output, is_equal_to_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:41:9`!("")); |
| 153 | } |
| 154 | |
| 155 | static void wrapped_show_failcxx . . $ wrapped_show_fail(f41b995409722d28).(TestReportercxx . . $ TestReporter# *reporter, const char *file, int line, |
| 156 | const char *message, ...) { |
| 157 | va_listcxx . . $ va_list# arguments; |
| 158 | va_startcxx . . $ `<external>/8293021631987149590/stdarg.h:51:9`!(arguments, message); |
| 159 | reporter->show_failcxx . . $ TestReporter_#show_fail.(reporter, file, line, message, arguments); |
| 160 | va_endcxx . . $ `<external>/8293021631987149590/stdarg.h:53:9`!(arguments); |
| 161 | } |
| 162 | |
| 163 | Ensurecxx . . $ contextForTextReporter.(TextReporter, will_use_arguments_for_show_fail) { |
| 164 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "test_name"); |
| 165 | |
| 166 | reportercxx . . $ reporter.->failurescxx . . $ TestReporter_#failures.++; // Simulating a failed assert |
| 167 | wrapped_show_failcxx . . $ wrapped_show_fail(f41b995409722d28).(reportercxx . . $ reporter., "file", 2, "test_case %s requires %i arguments", "Foo", 2); |
| 168 | |
| 169 | assert_thatcxx . . $ cgreen/(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("file:2: Failure")); |
| 170 | assert_thatcxx . . $ `include/cgreen/assertions.h:30:9`!(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("test_case Foo requires 2 arguments")); |
| 171 | |
| 172 | clear_outputcxx . . $ clear_output(49f6e7a06ebc5aa8).(); |
| 173 | |
| 174 | // Must indicate test case completion before calling finish_test() |
| 175 | send_reporter_completion_notificationcxx . . $ send_reporter_completion_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 176 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!); |
| 177 | assert_thatcxx . . $ output.(output, is_equal_to_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:41:9`!("")); |
| 178 | } |
| 179 | |
| 180 | Ensurecxx . . $ CgreenTest#(TextReporter, will_report_non_finishing_test) { |
| 181 | const int line = 666; |
| 182 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "suite_name", 1); |
| 183 | |
| 184 | send_reporter_exception_notificationcxx . . $ send_reporter_exception_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 185 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", line); |
| 186 | |
| 187 | assert_thatcxx . . $ cgreen/assert_that_(b064aa216885589).(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("1 exception")); |
| 188 | } |
| 189 | |
| 190 | /* Issue #335: in quiet mode the final summary must still reveal skipped |
| 191 | (xEnsure) and failed tests, otherwise there is no indication of them. */ |
| 192 | Ensurecxx . . $ CgreenSpec__TextReporter__quiet_mode_reports_skips_in_the_summary__.(TextReporter, quiet_mode_reports_skips_in_the_summary) { |
| 193 | TextReporterOptionscxx . . $ TextReporterOptions# quiet = {0}; |
| 194 | quiet.quiet_modecxx . . $ text_reporter_options#quiet_mode. = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 195 | set_reporter_optionscxx . . $ set_reporter_options(803220dde5864e9d).(reportercxx . . $ reporter., &quiet); |
| 196 | |
| 197 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "suite_name", 2); |
| 198 | |
| 199 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "a_pass"); |
| 200 | (*reportercxx . . $ reporter.->assert_truecxx . . $ TestReporter_#assert_true.)(reportercxx . . $ reporter., "file", 2, truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!, ""); |
| 201 | send_reporter_completion_notificationcxx . . $ send_reporter_completion_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 202 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!); |
| 203 | |
| 204 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "a_skip"); |
| 205 | send_reporter_skipped_notificationcxx . . $ send_reporter_skipped_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 206 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!); |
| 207 | |
| 208 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); |
| 209 | |
| 210 | assert_thatcxx . . $ output.(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("1 pass")); |
| 211 | assert_thatcxx . . $ output.(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("1 skipped")); |
| 212 | } |
| 213 | |
| 214 | /* Issue #335: a context that only suspended tests shows "S" in the dot stream. */ |
| 215 | Ensurecxx . . $ CgreenSpec__TextReporter__quiet_mode_marks_a_suspended_context_with_S__.(TextReporter, quiet_mode_marks_a_suspended_context_with_S) { |
| 216 | TextReporterOptionscxx . . $ TextReporterOptions# quiet = {0}; |
| 217 | quiet.quiet_modecxx . . $ text_reporter_options#quiet_mode. = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 218 | set_reporter_optionscxx . . $ set_reporter_options(803220dde5864e9d).(reportercxx . . $ reporter., &quiet); |
| 219 | |
| 220 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "run", 1); |
| 221 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "a_context", 1); |
| 222 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "a_skip"); |
| 223 | send_reporter_skipped_notificationcxx . . $ send_reporter_skipped_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 224 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!); |
| 225 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); /* nested context -> "S" */ |
| 226 | |
| 227 | assert_thatcxx . . $ intptr_t#(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("S")); |
| 228 | |
| 229 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); /* top-level -> summary */ |
| 230 | } |
| 231 | |
| 232 | /* Issue #335: a context with both a failure and a skip shows the more severe |
| 233 | "F" in the stream, but the skip is still tallied in the summary. */ |
| 234 | Ensurecxx . . $ `include/cgreen/unit.h:25:9`!(TextReporter, quiet_mode_shows_F_but_still_tallies_a_skip_in_a_mixed_context) { |
| 235 | TextReporterOptionscxx . . $ TextReporterOptions# quiet = {0}; |
| 236 | quiet.quiet_modecxx . . $ text_reporter_options#quiet_mode. = truecxx . . $ `<external>/13015445228558014418/stdbool.h:37:9`!; |
| 237 | set_reporter_optionscxx . . $ set_reporter_options(803220dde5864e9d).(reportercxx . . $ reporter., &quiet); |
| 238 | |
| 239 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "run", 1); |
| 240 | reportercxx . . $ reporter.->start_suitecxx . . $ TestReporter_#start_suite.(reportercxx . . $ reporter., "a_context", 2); |
| 241 | |
| 242 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "a_skip"); |
| 243 | send_reporter_skipped_notificationcxx . . $ send_reporter_skipped_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 244 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:416:9`!); |
| 245 | |
| 246 | reportercxx . . $ reporter.->start_testcxx . . $ TestReporter_#start_test.(reportercxx . . $ reporter., "a_fail"); |
| 247 | (*reportercxx . . $ reporter.->assert_truecxx . . $ TestReporter_#assert_true.)(reportercxx . . $ reporter., "file", 2, falsecxx . . $ `<external>/13015445228558014418/stdbool.h:38:9`!, "boom"); |
| 248 | send_reporter_completion_notificationcxx . . $ send_reporter_completion_notification(1083e9dac9de8fd0).(reportercxx . . $ reporter.); |
| 249 | reportercxx . . $ reporter.->finish_testcxx . . $ TestReporter_#finish_test.(reportercxx . . $ reporter., "filename", linecxx . . $ line., NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!); |
| 250 | |
| 251 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); /* context -> "F", not "S" */ |
| 252 | reportercxx . . $ reporter.->finish_suitecxx . . $ TestReporter_#finish_suite.(reportercxx . . $ reporter., "filename", linecxx . . $ line.); /* top-level -> summary */ |
| 253 | |
| 254 | assert_thatcxx . . $ intptr_t#(strstr(output, "S"), is_nullcxx . . $ `include/cgreen/constraint_syntax_helpers.h:31:9`!); /* the stream char is F, not S */ |
| 255 | assert_thatcxx . . $ cgreen/assert_that_(b064aa216885589).(output, contains_stringcxx . . $ `include/cgreen/constraint_syntax_helpers.h:43:9`!("skipped")); /* but the skip is still tallied */ |
| 256 | } |
| 257 | |
| 258 | TestSuitecxx . . $ TestSuite# *text_reporter_testscxx . . $ text_reporter_tests(564401a81ded3a53).(void) { |
| 259 | TestSuitecxx . . $ TestSuite# *suite = create_test_suitecxx . . $ `include/cgreen/suite.h:20:9`!(); |
| 260 | set_setupcxx . . $ set_setup(375347ed146b1459).(suite, text_reporter_tests_setupcxx . . $ text_reporter_tests_setup(49f6e7a06ebc5aa8).); |
| 261 | |
| 262 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, will_report_beginning_and_end_of_suites); |
| 263 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, will_report_passed_for_test_with_one_pass_on_completion); |
| 264 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, will_report_failed_once_for_each_fail); |
| 265 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, will_report_non_finishing_test); |
| 266 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, quiet_mode_reports_skips_in_the_summary); |
| 267 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, quiet_mode_marks_a_suspended_context_with_S); |
| 268 | add_test_with_contextcxx . . $ `include/cgreen/suite.h:23:9`!(suite, TextReporter, quiet_mode_shows_F_but_still_tallies_a_skip_in_a_mixed_context); |
| 269 | |
| 270 | set_teardowncxx . . $ set_teardown(375347ed146b1459).(suite, text_reporter_tests_teardowncxx . . $ text_reporter_tests_teardown(49f6e7a06ebc5aa8).); |
| 271 | return suite; |
| 272 | } |