Chebyshev
Unit testing for scientific software
|
Output formatting functions. More...
Functions | |
OutputFormat | barebone () |
Bare bone output format which just prints the result table as is, without any formatting beyond adjusting column width. | |
OutputFormat | simple () |
Simple output format which prints the fields separated by the separator string and padding, if enabled. More... | |
OutputFormat | fancy (bool adaptiveWidth=true) |
Fancy output format which uses Unicode characters to print a continuous outline around the table. More... | |
OutputFormat | csv (const std::string &separator=",") |
Format function for CSV format files. More... | |
OutputFormat | markdown () |
Format the table as Markdown. More... | |
OutputFormat | latex () |
Format the table as a LaTeX table in the tabular environment. More... | |
Output formatting functions.
Output formats are handled by a lambda or function with the signature of OutputFormat. An output format is a function which takes in a matrix of strings which contains all entries of the table resulting from tests, the list of the fields printed in each respective column and the global settings of the output module (which contains the options for formatting and other settings). The output format may be fully customized, but many options are already available in this namespace. The output format is returned by each function (functions are used to construct a format taking custom options).
|
inline |
Format function for CSV format files.
The OutputFormat is returned as a lambda function.
separator | The string to print between different fields (defaults to ","). |
|
inline |
Fancy output format which uses Unicode characters to print a continuous outline around the table.
The OutputFormat is returned as a lambda function.
|
inline |
Format the table as a LaTeX table in the tabular environment.
The OutputFormat is returned as a lambda function.
|
inline |
Format the table as Markdown.
The OutputFormat is returned as a lambda function.
|
inline |
Simple output format which prints the fields separated by the separator string and padding, if enabled.
The OutputFormat is returned as a lambda function. This format is a good starting point if you want to implement your own custom output format.