Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
diagnostic-output.hpp
Go to the documentation of this file.
1/*
2 DIAGNOSTIC-OUTPUT.hpp - some helpers for investigation and value output
3
4 Copyright (C)
5 2022, Hermann Vosseler <Ichthyostega@web.de>
6
7  **Lumiera** is free software; you can redistribute it and/or modify it
8  under the terms of the GNU General Public License as published by the
9  Free Software Foundation; either version 2 of the License, or (at your
10  option) any later version. See the file COPYING for further details.
11
12*/
13
14
26#ifndef LIB_TEST_DIAGNOSTIC_OUTPUT_H
27#define LIB_TEST_DIAGNOSTIC_OUTPUT_H
28
29
30#include "lib/format-cout.hpp"
32
33#include <boost/lexical_cast.hpp>
34#include <string>
35
36
37using std::string;
38
39namespace lib {
40namespace test{
41
42}} // namespace lib::test
43
44
45
46
47/* === test helper macros === */
48
53#define SHOW_TYPE(_TY_) \
54 cout << "typeof( " << STRINGIFY(_TY_) << " )= " << lib::test::showType<_TY_>() <<endl;
55#define SHOW_EXPR(_XX_) \
56 cout << "#--◆--# " << STRINGIFY(_XX_) << " ? = " << util::toString(_XX_) <<endl;
57#define SHOW_EXPL(_XX_) \
58 cout << "#--◆--# " << STRINGIFY(_XX_) << " ? = " << boost::lexical_cast<string>(_XX_) <<endl;
59
60
61#endif /*LIB_TEST_DIAGNOSTIC_OUTPUT_H*/
Automatically use custom string conversion in C++ stream output.
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
A collection of frequently used helper functions to support unit testing.