Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
generic-id-function-test.cpp
Go to the documentation of this file.
1/*
2 GenericIdFunction(Test) - cover instance and type id generation
3
4 Copyright (C)
5 2015, 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
19#include "lib/test/run.hpp"
20//#include "lib/test/test-helper.hpp"
21#include "lib/idi/genfunc.hpp"
22//#include "lib/format-cout.hpp"
23
24//#include <utility>
25//#include <string>
26//#include <vector>
27
28//using std::string;
29//using std::vector;
30//using std::swap;
31
32
33namespace lib {
34namespace idi {
35namespace test{
36
37// using lumiera::error::LUMIERA_ERROR_LOGIC;
38
39 namespace {//Test fixture....
40
41 class Thing
42 { };
43
44 template<typename X>
45 struct Some
46 {
47 X x;
48 };
49
51
52 }//(End)Test fixture
53
54
55
56
57
58
59
60
61
62 /**************************************************************************/
68 class GenericIdFunction_test : public Test
69 {
70
71 virtual void
81
82
83 void
85 {
86 CHECK ("int" == typeSymbol<int>());
87 CHECK ("bool" == typeSymbol<bool>());
88
89 CHECK ("Some" == categoryFolder<SomeThing>());
90 }
91
92
93 void
95 {
96 }
97
98
99 void
101 {
102 CHECK("Some_Thing" == typeFullID<SomeThing>());
103 }
104
105
106 void
108 {
109 }
110
111
112 void
114 {
115 }
116
117
118 void
120 {
121 class Unique { };
122
123 CHECK ("Unique.001" == generateSymbolicID<Unique>());
124 CHECK ("Unique.002" == generateSymbolicID<Unique>());
125 CHECK ("Unique.003" == generateSymbolicID<Unique>());
126 }
127 };
128
129
132
133
134
135}}} // namespace lib::idi::test
Generic functions to build identification schemes.
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Definition run.hpp:116