To cause some messages to display to the console but not be saved, use the special tier kEphemeral. The Test framework displays text in this tier to the console but does not save it in the text buffer. Note that this capability is simply a special case of the usual tier mechanism:
void TSampleObjectOutputLogTest::Test() { bool success = true; // Always set 'success' to false if any test fails. // Always check to see that 'success' is true before beginning subsequent // tests. // This will be recorded in the test: OutputTextStream() << "\nThis is information about the test.\n\n"; // Subsequent text will go to the console but not to the test log. OutputTextStream() << PushTier(TTieredText::kEphemeral); for (short i=0; i<10; i++) { OutputTextStream() << "Loop cycle " << i << " \n"; } // Start recording to log again OutputTextStream() << PopTier() << "Loop completed " << i << " cycles.\n"; SetSuccess(success); // *** NEVER DELETE THIS }
This is information about the test. Loop cycle 0 Loop cycle 1 Loop cycle 2 Loop cycle 3 Loop cycle 4 Loop cycle 5 Loop cycle 6 Loop cycle 7 Loop cycle 8 Loop cycle 9 Loop completed 10 cycles. Test TSampleObjectOutputLogTest ( Pass ) {}
Test TSampleObjectOutputLogTest ( Pass ) { This is information about the test. Loop completed 10 cycles.