-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathvalue-ptr-main.t.cpp
90 lines (74 loc) · 2.84 KB
/
value-ptr-main.t.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Copyright 2017-2018 by Martin Moene
//
// https://github.com/martinmoene/value-ptr-lite
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include "value-ptr-main.t.hpp"
#define nsvp_PRESENT( x ) \
std::cout << #x << ": " << x << "\n"
#define nsvp_ABSENT( x ) \
std::cout << #x << ": (undefined)\n"
lest::tests & specification()
{
static lest::tests tests;
return tests;
}
CASE( "value-ptr-lite version" "[.value-ptr][.version]" )
{
nsvp_PRESENT( value_ptr_lite_MAJOR );
nsvp_PRESENT( value_ptr_lite_MINOR );
nsvp_PRESENT( value_ptr_lite_PATCH );
nsvp_PRESENT( value_ptr_lite_VERSION );
}
CASE( "value-ptr configuration" "[.value-ptr][.config]" )
{
nsvp_PRESENT( nsvp_CONFIG_COMPARE_POINTERS );
nsvp_PRESENT( nsvp_CONFIG_NO_EXCEPTIONS );
nsvp_PRESENT( nsvp_CPLUSPLUS );
}
CASE( "C++ language: __cplusplus" "[.stdc++]" )
{
nsvp_PRESENT( __cplusplus );
}
CASE( "C++ compiler: compiler version" "[.compiler]" )
{
nsvp_PRESENT( nsvp_COMPILER_CLANG_VERSION );
nsvp_PRESENT( nsvp_COMPILER_GNUC_VERSION );
nsvp_PRESENT( nsvp_COMPILER_MSVC_VERSION );
}
CASE( "C++ language: presence of C++ language features" "[.stdlanguage]" )
{
nsvp_PRESENT( nsvp_HAVE_CONSTEXPR_11 );
nsvp_PRESENT( nsvp_HAVE_CONSTEXPR_14 );
nsvp_PRESENT( nsvp_HAVE_INITIALIZER_LIST );
nsvp_PRESENT( nsvp_HAVE_IS_DEFAULT );
nsvp_PRESENT( nsvp_HAVE_NOEXCEPT );
nsvp_PRESENT( nsvp_HAVE_NULLPTR );
nsvp_PRESENT( nsvp_HAVE_REF_QUALIFIER );
}
CASE( "C++ library: presence of C++ library features" "[.stdlibrary]" )
{
nsvp_PRESENT( nsvp_HAVE_TYPE_TRAITS );
nsvp_PRESENT( nsvp_HAS_CPP0X );
#if defined _HAS_CPP0X
nsvp_PRESENT( _HAS_CPP0X );
#else
nsvp_ABSENT( _HAS_CPP0X );
#endif
}
int main( int argc, char * argv[] )
{
return lest::run( specification(), argc, argv );
}
#if 0
g++ -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
g++ -std=c++98 -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
g++ -std=c++03 -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
g++ -std=c++0x -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
g++ -std=c++11 -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
g++ -std=c++14 -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
g++ -std=c++17 -I../include -o value-ptr-main.t.exe value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
cl -EHsc -I../include value-ptr-main.t.cpp value-ptr.t.cpp && value-ptr-main.t.exe --pass
#endif
// end of file