DAS  3.0
Das Analysis System
Exceptions.cc File Reference
#include <unistd.h>
#include <boost/test/included/unit_test.hpp>
#include <exceptions.h>
+ Include dependency graph for Exceptions.cc:

Macros

#define BOOST_TEST_MODULE   Exceptions
 

Functions

void WriteN (int N, bool flush)
 
 WriteN (1, false)
 
 BOOST_TEST (intercept_printf([] { WriteN(1, true);})=="*")
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   Exceptions

Function Documentation

◆ BOOST_TEST()

BOOST_TEST ( intercept_printf([] { WriteN(1, true);})  = ="*")

◆ WriteN() [1/2]

WriteN ( ,
false   
)

Tests intercept_printf.

◆ WriteN() [2/2]

void WriteN ( int  N,
bool  flush 
)

Write N bytes to stdout, optionally flushing it.

41 {
42  if (N > 0) printf("%*s", N, "*");
43  if (flush) fflush(stdout);
44 }