AUnit  0.5.2
Unit testing framework for Arduino platforms inspired by ArduinoUnit and Google Test.
Static Public Member Functions | List of all members
aunit::Printer Class Reference

Utility class that provides a level of indirection to the Print class where test results can be sent. More...

#include <Printer.h>

Static Public Member Functions

static Print * getPrinter ()
 Get the output printer used by the various assertion() methods and the TestRunner. More...
 
static void setPrinter (Print *printer)
 Set the printer. More...
 
static void print (const internal::FCString &s)
 Convenience method for printing an FCString. More...
 
static void println (const internal::FCString &s)
 Convenience method for printing an FCString. More...
 

Detailed Description

Utility class that provides a level of indirection to the Print class where test results can be sent.

By default, the Print object will be the Serial object. This can be changed using the setPrinter() method.

This class assumes that it will be used after all static initializations have finished. Because static initialization ordering is undefined, if this utility is used during static initialization, the behaviour is undefined.

Definition at line 45 of file Printer.h.

Member Function Documentation

◆ getPrinter()

static Print* aunit::Printer::getPrinter ( )
inlinestatic

Get the output printer used by the various assertion() methods and the TestRunner.

The default is the predefined Serial object. Can be changed using the setPrinter() method.

Definition at line 52 of file Printer.h.

◆ print()

void aunit::Printer::print ( const internal::FCString s)
static

Convenience method for printing an FCString.

Definition at line 33 of file Printer.cpp.

◆ println()

void aunit::Printer::println ( const internal::FCString s)
static

Convenience method for printing an FCString.

Definition at line 41 of file Printer.cpp.

◆ setPrinter()

static void aunit::Printer::setPrinter ( Print *  printer)
inlinestatic

Set the printer.

Definition at line 55 of file Printer.h.


The documentation for this class was generated from the following files: