Lumiera  0.pre.03
»edit your freedom«
diagnostic-output.hpp File Reference

Go to the source code of this file.

Description

Helpers typically used while writing tests.

In the finished test, we rather want values be asserted explicitly in the test code, but while building the test, it is often necessary to see the types and the actual values of intermediary results, to get a clue where matters go south.

See also
test-helper.hpp

Definition in file diagnostic-output.hpp.

#include "lib/format-cout.hpp"
#include "lib/test/test-helper.hpp"
#include <boost/lexical_cast.hpp>
#include <string>

Macros

#define SHOW_EXPL(_XX_)   cout << "#--◆--# " << STRINGIFY(_XX_) << " ? = " << boost::lexical_cast<string>(_XX_) <<endl;
 
#define SHOW_EXPR(_XX_)   cout << "#--◆--# " << STRINGIFY(_XX_) << " ? = " << util::toString(_XX_) <<endl;
 
#define SHOW_TYPE(_TY_)   cout << "typeof( " << STRINGIFY(_TY_) << " )= " << lib::test::showType<_TY_>() <<endl;
 Macro to print types and expressions to STDOUT, using Lumiera's string conversion framework.
 

Namespaces

 lib
 Implementation namespace for support and library code.