[詳解]
15 #ifndef INCG_IRIS_IUTEST_OPTION_MESSAGE_HPP_00EB9B17_0615_4678_9AD0_1F5B295B404F_
16 #define INCG_IRIS_IUTEST_OPTION_MESSAGE_HPP_00EB9B17_0615_4678_9AD0_1F5B295B404F_
34 static void ShowHelp();
38 static void ShowVersion();
42 static void ShowFeature();
46 static void ShowSpec();
49 inline void iuOptionMessage::ShowHelp()
51 detail::iuConsole::color_output(detail::iuConsole::cyan,
52 "--------------------------------------------------\n"
54 " iutest - iris unit test framework\n"
55 "--------------------------------------------------\n"
56 "Command Line Options\n"
58 " --help, -h : Generate help message.\n"
59 " --iutest_list_tests : List up tests.\n"
60 " --iutest_list_tests_with_where : List up tests with where.\n"
61 " --iutest_color=<yes|no|auto|ansi>: Console color enable.\n"
62 " --iutest_flagfile=<file> : Set the flag from the file.\n"
63 " --iutest_filter=<filter> : Select the test run.\n"
64 " --iutest_shuffle : Do shuffle test.\n"
65 " --iutest_random_seed=<seed> : Set random seed.\n"
66 " --iutest_also_run_disabled_tests : Run disabled tests.\n"
67 " --iutest_break_on_failure[=0|1] : When that failed to break.\n"
68 " --iutest_throw_on_failure[=0|1] : When that failed to throw.\n"
69 " --iutest_catch_exceptions=<0|1> : Catch exceptions enable.\n"
70 " --iutest_print_time=<0|1> : Setting the display of elapsed time.\n"
71 " --iutest_default_package_name=<name>\n"
72 " : Set default root package name.\n"
73 " --iutest_output=<xml|junit>[:path]\n"
74 " : Path of xml report.\n"
75 " --iutest_repeat=<count>\n"
76 " : Set the number of repetitions of the test.\n"
77 " use a negative count to repeat forever.\n"
79 " --iutest_stream_result_to=<host:port>\n"
80 " : Set stream test results server.\n"
82 " --iutest_file_location=<auto|vs|gcc>\n"
83 " : Format file location messages.\n"
84 " --verbose : Verbose option.\n"
85 " --feature : Show iutest feature.\n"
86 " --version, -v : Show iutest version.\n"
88 "--------------------------------------------------\n"
91 " Copyright (c) 2011-2018, Takazumi-Shirayanagi\n"
93 " This software is released under the new BSD License, see LICENSE\n"
98 inline void iuOptionMessage::ShowVersion()
100 detail::iuConsole::output(
"iutest version %x.%x.%x.%x\n"
105 #define IIUT_SHOW_MACRO(macro) IIUT_SHOW_MACRO_I(#macro, IUTEST_PP_TOSTRING(macro))
106 #define IIUT_SHOW_MACRO_I(name, value) detail::iuConsole::output("#define %s %s\n", name, value)
107 #define IIUT_SHOW_ENABLE_MACRO(macro) IUTEST_PP_IF(macro, IIUT_SHOW_MACRO_I(#macro, IUTEST_PP_TOSTRING(macro)), IUTEST_PP_EMPTY())
108 #define IIUT_SHOW_DISABLE_MACRO(macro) IUTEST_PP_IF(macro, IUTEST_PP_EMPTY(), IIUT_SHOW_MACRO_I(#macro, IUTEST_PP_TOSTRING(macro)))
111 #define IIUT_SHOW_FEATURE_MACROS(m) \
112 m (IUTEST_HAS_ANY_PARAM_TEST); \
113 m (IUTEST_HAS_ASSERTION_NOEQUALTO_OBJECT); \
114 m (IUTEST_HAS_ASSERTION_RETURN); \
115 m (IUTEST_HAS_AUTOFIXTURE_PARAM_TEST); \
116 m (IUTEST_HAS_COMBINE); \
117 m (IUTEST_HAS_CONCAT); \
118 m (IUTEST_HAS_CSVPARAMS); \
119 m (IUTEST_HAS_EXCEPTIONS); \
120 m (IUTEST_HAS_GENRAND); \
121 m (IUTEST_HAS_IGNORE_TEST); \
122 m (IUTEST_HAS_LONG_DOUBLE); \
123 m (IUTEST_HAS_LIB); \
124 m (IUTEST_HAS_MATCHERS); \
125 m (IUTEST_HAS_MATCHER_ALLOF_AND_ANYOF); \
126 m (IUTEST_HAS_MATCHER_EACH); \
127 m (IUTEST_HAS_MATCHER_ELEMENTSARE); \
128 m (IUTEST_HAS_MATCHER_FLOATINGPOINT_NEAR); \
129 m (IUTEST_HAS_MATCHER_POINTWISE); \
130 m (IUTEST_HAS_MATCHER_REGEX); \
131 m (IUTEST_HAS_MATCHER_VARIADIC); \
132 m (IUTEST_HAS_MINIDUMP); \
133 m (IUTEST_HAS_PACKAGE); \
134 m (IUTEST_HAS_PAIRWISE); \
135 m (IUTEST_HAS_PARAM_METHOD_TEST); \
136 m (IUTEST_HAS_PARAM_TEST); \
137 m (IUTEST_HAS_PARAM_TEST_PARAM_NAME_GENERATOR); \
138 m (IUTEST_HAS_PEEP); \
139 m (IUTEST_HAS_PEEP_CLASS); \
140 m (IUTEST_HAS_PEEP_FUNC); \
141 m (IUTEST_HAS_PEEP_STATIC_FUNC); \
142 m (IUTEST_HAS_PRINT_TO); \
143 m (IUTEST_HAS_RANDOMVALUES); \
144 m (IUTEST_HAS_REGEX); \
145 m (IUTEST_HAS_REPORT_SKIPPED); \
146 m (IUTEST_HAS_SOCKET); \
147 m (IUTEST_HAS_SPI_LAMBDA_SUPPORT); \
148 m (IUTEST_HAS_STATIC_ASSERT); \
149 m (IUTEST_HAS_STATIC_ASSERT_TYPEEQ); \
150 m (IUTEST_HAS_STREAM_BUFFER); \
151 m (IUTEST_HAS_STREAM_RESULT); \
152 m (IUTEST_HAS_TESTFIXTURE_ALIAS_BY_TUPLE); \
153 m (IUTEST_HAS_TESTNAME_ALIAS); \
154 m (IUTEST_HAS_TESTNAME_ALIAS_JP); \
155 m (IUTEST_HAS_TYPED_TEST); \
156 m (IUTEST_HAS_TYPED_TEST_APPEND_TYPENAME); \
157 m (IUTEST_HAS_TYPED_TEST_P); \
158 m (IUTEST_HAS_VALUESGEN); \
159 m (IUTEST_HAS_VARIADIC_COMBINE); \
160 m (IUTEST_HAS_VARIADIC_PAIRWISE); \
161 m (IUTEST_HAS_VARIADIC_VALUES)
163 inline void iuOptionMessage::ShowFeature()
166 IIUT_SHOW_FEATURE_MACROS(IIUT_SHOW_MACRO);
168 IIUT_SHOW_FEATURE_MACROS(IIUT_SHOW_ENABLE_MACRO);
169 IIUT_SHOW_FEATURE_MACROS(IIUT_SHOW_DISABLE_MACRO);
173 inline void iuOptionMessage::ShowSpec()
175 IIUT_SHOW_MACRO(IUTEST_PLATFORM);
178 IIUT_SHOW_MACRO(IUTEST_CPLUSPLUS);
188 IIUT_SHOW_MACRO(IUTEST_HAS_CONCEPTS);
205 IIUT_SHOW_MACRO(IUTEST_HAS_CXX_HDR_TYPE_TARITS);
207 IIUT_SHOW_MACRO(IUTEST_HAS_CXX_HDR_VERSION);
210 IIUT_SHOW_MACRO(IUTEST_HAS_CXX1Z);
212 IIUT_SHOW_MACRO(IUTEST_HAS_CXX2A);
216 IIUT_SHOW_MACRO(IUTEST_HAS_EXCEPTIONS);
229 IIUT_SHOW_MACRO(IUTEST_HAS_MOVE_ASSIGNMENT_DEFAULT_FUNCTION);
247 IIUT_SHOW_MACRO(IUTEST_HAS_VARIADIC_TEMPLATES);
249 IIUT_SHOW_MACRO(IUTEST_HAS_VARIADIC_TUPLES);
254 IIUT_SHOW_MACRO(IUTEST_WCHAR_UNSIGNED);
256 #ifdef IUTEST_LIBSTDCXX_VERSION
257 IIUT_SHOW_MACRO(IUTEST_LIBSTDCXX_VERSION);
261 IIUT_SHOW_MACRO(_MSC_FULL_VER);
264 IIUT_SHOW_MACRO(__GLIBCXX__);
267 IIUT_SHOW_MACRO(__GLIBCPP__);
269 #ifdef _GLIBCXX_USE_CXX11_ABI
270 IIUT_SHOW_MACRO(_GLIBCXX_USE_CXX11_ABI);
272 #ifdef _LIBCPP_VERSION
273 IIUT_SHOW_MACRO(_LIBCPP_VERSION);
275 #ifdef __POSIX_VISIBLE
276 IIUT_SHOW_MACRO(__POSIX_VISIBLE);
278 #ifdef __USE_MINGW_ANSI_STDIO
279 IIUT_SHOW_MACRO(__USE_MINGW_ANSI_STDIO);
281 #ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
282 IIUT_SHOW_MACRO(__MAC_OS_X_VERSION_MIN_REQUIRED);
285 #undef IIUT_SHOW_MACRO
291 #endif // INCG_IRIS_IUTEST_OPTION_MESSAGE_HPP_00EB9B17_0615_4678_9AD0_1F5B295B404F_
#define IUTEST_HAS_CXX_HDR_ANY
has any header
Definition: iutest_stdlib.hpp:383
#define IUTEST_HAS_CXX_HDR_REGEX
has regex header
Definition: iutest_stdlib.hpp:427
#define IUTEST_USE_THROW_ON_ASSERTION_FAILURE
失敗時に例外を throw します。
Definition: iutest_config.hpp:320
#define IUTEST_HAS_STD_TO_CHARS
has to_chars
Definition: iutest_stdlib.hpp:511
#define IUTEST_HAS_CONSTEXPR_IF
constexpr if
Definition: iutest_compiler.hpp:144
#define IUTEST_HAS_CONSTEXPR
has constexpr
Definition: iutest_compiler.hpp:291
#define IUTEST_USE_OWN_STRING_VIEW
独自 string_view クラスを使う
Definition: iutest_config.hpp:708
#define IUTEST_HAS_CXX_HDR_CSTDINT
has cstdint header
Definition: iutest_stdlib.hpp:407
#define IUTEST_HAS_CHAR32_T
has char32_t
Definition: iutest_compiler.hpp:560
#define IUTEST_HAS_ANALYSIS_ASSUME
has __analysis_assume
Definition: iutest_compiler.hpp:1112
#define IUTEST_HAS_CXX_HDR_CODECVT
has codecvt header
Definition: iutest_stdlib.hpp:403
#define IUTEST_HAS_CHAR32_T_PRINTABLE
char32_t printable
Definition: iutest_config.hpp:628
#define IUTEST_HAS_TUPLE
has tuple
Definition: iutest_stdlib.hpp:539
#define IUTEST_HAS_CXX_HDR_FILESYSTEM
has filesystem
Definition: iutest_stdlib.hpp:415
#define IUTEST_HAS_DECLTYPE
has decltype
Definition: iutest_compiler.hpp:236
#define IUTEST_HAS_HDR_SYSTIME
has sys/time.h header
Definition: iutest_stdlib.hpp:751
#define IUTEST_USE_OWN_LIST
テストの所持を独自リストクラスで行う
Definition: iutest_config.hpp:700
#define IUTEST_HAS_STD_EMPLACE
has emplace
Definition: iutest_stdlib.hpp:495
#define IUTEST_HAS_NOEXCEPT
has noexcept
Definition: iutest_compiler.hpp:706
#define IUTEST_HAS_CXX_HDR_STRING_VIEW
has string_view header
Definition: iutest_stdlib.hpp:431
iutest root namespace
Definition: iutest_charcode.hpp:31
#define IUTEST_HAS_OVERRIDE_AND_FINAL
has override and final
Definition: iutest_compiler.hpp:662
#define IUTEST_BUILD
Definition: iutest_ver.hpp:27
#define IUTEST_HAS_CXX_HDR_CUCHAR
has cuchar
Definition: iutest_stdlib.hpp:411
#define IUTEST_HAS_WANT_SECURE_LIB
partial template specialization
Definition: iutest_compiler.hpp:1063
#define IUTEST_HAS_EXPLICIT_CONVERSION
explicit conversion operator
Definition: iutest_compiler.hpp:628
#define IUTEST_HAS_CXX17
is c++17 compiler
Definition: iutest_compiler.hpp:66
#define IUTEST_HAS_INITIALIZER_LIST
has initializer_list
Definition: iutest_compiler.hpp:450
#define IUTEST_HAS_STRONG_ENUMS
has enum class
Definition: iutest_compiler.hpp:796
#define IUTEST_HAS_DEFAULT_FUNCTIONS
has default function
Definition: iutest_compiler.hpp:410
#define IUTEST_HAS_EXTERN_TEMPLATE
has extern template
Definition: iutest_compiler.hpp:771
#define IUTEST_HAS_STREAM_RESULT
stream result が使用可能かどうか
Definition: iutest_config.hpp:732
#define IUTEST_HAS_RVALUE_REFS
has rvalue reference
Definition: iutest_compiler.hpp:339
#define IUTEST_HAS_COUNTER_MACRO
has COUNTER
Definition: iutest_compiler.hpp:956
#define IUTEST_HAS_GETTIMEOFDAY
gettimeofday 関数が使用可能かどうか
Definition: iutest_config.hpp:585
#define IUTEST_HAS_NULLPTR
has nullptr
Definition: iutest_compiler.hpp:176
#define IUTEST_HAS_CTIME
time 関数が使用可能かどうか
Definition: iutest_config.hpp:573
#define IUTEST_HAS_ATTRIBUTE
has c++11 attribute [[]]
Definition: iutest_compiler.hpp:1179
#define IUTEST_HAS_VARIADIC_TEMPLATE_TEMPLATES
has variadic template
Definition: iutest_compiler.hpp:506
#define IUTEST_MAJORVER
Major Version
Definition: iutest_ver.hpp:22
#define IUTEST_HAS_LAMBDA_STATEMENTS
lambda を使った statements 展開が可能かどうか
Definition: iutest_config.hpp:337
#define IUTEST_HAS_CXX_HDR_VARIANT
has variant header
Definition: iutest_stdlib.hpp:435
#define IUTEST_HAS_HDR_CXXABI
has cxxabi header
Definition: iutest_stdlib.hpp:439
#define IUTEST_HAS_SEH
has exceptions
Definition: iutest_compiler.hpp:838
#define IUTEST_HAS_INLINE_VARIABLE
inline variable
Definition: iutest_compiler.hpp:129
#define IUTEST_HAS_AUTO
auto
Definition: iutest_compiler.hpp:209
#define IUTEST_CHECK_STRICT
テストのチェック機能の有無
Definition: iutest_config.hpp:643
#define IUTEST_REVISION
Revision
Definition: iutest_ver.hpp:25
#define IUTEST_HAS_DELETED_FUNCTIONS
has delete function
Definition: iutest_compiler.hpp:364
#define IUTEST_HAS_STD_FILESYSTEM
has filesystem
Definition: iutest_stdlib.hpp:499
#define IUTEST_HAS_CXX_HDR_CHRONO
has chrono header
Definition: iutest_stdlib.hpp:395
#define IUTEST_HAS_CHAR16_T
has char16_t
Definition: iutest_compiler.hpp:533
#define IUTEST_HAS_STD_DECLVAL
has ::std::declval
Definition: iutest_stdlib.hpp:491
#define IUTEST_HAS_CXX_HDR_RANDOM
has random header
Definition: iutest_stdlib.hpp:423
#define IUTEST_HAS_CXX14
is c++14 compiler
Definition: iutest_compiler.hpp:87
#define IUTEST_HAS_LAMBDA
has lambda
Definition: iutest_compiler.hpp:593
#define IUTEST_HAS_RTTI
has RTTI
Definition: iutest_compiler.hpp:879
#define IUTEST_HAS_CXX_HDR_ARRAY
has array header
Definition: iutest_stdlib.hpp:387
#define IUTEST_HAS_CHAR16_T_PRINTABLE
char16_t printable
Definition: iutest_config.hpp:617
#define IUTEST_HAS_CLOCK
clock 関数が使用可能かどうか
Definition: iutest_config.hpp:596
#define IUTEST_MINORVER
Minor Version
Definition: iutest_ver.hpp:23
#define IUTEST_HAS_IF_EXISTS
has __if_exists
Definition: iutest_compiler.hpp:1095
#define IUTEST_HAS_CXX_HDR_OPTIONAL
has optional header
Definition: iutest_stdlib.hpp:419
#define IUTEST_HAS_IOMANIP
iomanip が使用可能かどうか
Definition: iutest_stdlib.hpp:783
#define IUTEST_HAS_STD_STR_TO_VALUE
::std::sto* が使用可能かどうか
Definition: iutest_stdlib.hpp:572
#define IUTEST_HAS_STD_QUICK_EXIT
has quick_exit
Definition: iutest_stdlib.hpp:507
#define IUTEST_HAS_STD_BEGIN_END
has ::std::begin,::std::end
Definition: iutest_stdlib.hpp:487
#define IUTEST_HAS_STRINGSTREAM
::std::stringstream が使用可能かどうか
Definition: iutest_stdlib.hpp:762
#define IUTEST_HAS_CXX11
is c++11 compiler
Definition: iutest_compiler.hpp:98
#define IUTEST_HAS_CXX_HDR_CHARCONV
has charconv header
Definition: iutest_stdlib.hpp:391
#define IUTEST_HAS_INT128
has 128bit type
Definition: iutest_compiler.hpp:912
#define IUTEST_HAS_CATCH_SEH_EXCEPTION_ASSERTION
例外アサーションで SEH をキャッチ可能かどうか
Definition: iutest_config.hpp:351
#define IUTEST_HAS_STRSTREAM
::std::strstream が使用可能かどうか
Definition: iutest_stdlib.hpp:777