Report a bug If you spot a problem with this page, click here to create a Bugzilla issue. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

std.experimental.testing.io

IO related functions
void writelnUt(T...)(T args);
Write if debug output was enabled. Not thread-safe in the sense that it will get printed out immediately and may overlap with other output. This is why the test runner forces single-threaded mode when debug mode is selected.
package @safe void addToOutput(ref string output, in string msg);
Adds to the test cases output so far or immediately prints
Parameters:
string output The output to add to.
string msg The string to add.
class WriterThread;
Thread to output to stdout
static WriterThread get();
Returns a reference to the only instance of this class.
void write(T...)(T args);
Writes the args in a thread-safe manner.
void writeln(T...)(T args);
Writes the args in a thread-safe manner and appends a newline.
void writelnGreen(T...)(T args);
Writes the args in a thread-safe manner in green (POSIX only). and appends a newline.
void writelnRed(T...)(T args);
Writes the args in a thread-safe manner in red (POSIX only) and appends a newline.
void writeRed(T...)(T args);
Writes the args in a thread-safe manner in red (POSIX only). and appends a newline.
void writeYellow(T...)(T args);
Writes the args in a thread-safe manner in yellow (POSIX only). and appends a newline.
static void start();
Creates the singleton instance and waits until it's ready.
void join();
Waits for the writer thread to terminate.