iutest  1.17.99.14
iutest_constant.hpp
[詳解]
1 //======================================================================
2 //-----------------------------------------------------------------------
13 //-----------------------------------------------------------------------
14 //======================================================================
15 #ifndef INCG_IRIS_IUTEST_CONSTANT_HPP_37DDDC13_3259_42E0_A648_47B064DED4BA_
16 #define INCG_IRIS_IUTEST_CONSTANT_HPP_37DDDC13_3259_42E0_A648_47B064DED4BA_
17 
18 //======================================================================
19 // include
20 
21 namespace iutest {
22 namespace detail
23 {
24 
25 #if IUTEST_HAS_INLINE_VARIABLE
26 
27 namespace kStrings
28 {
29  static inline const char* const DefaultXmlReportFileName = "test_detail.xml";
30  static inline const char* const UnknownFile = "unknown file";
31  static inline const char* const Null = "(null)";
32 }
33 
34 #else
35 
36 namespace helper
37 {
38 
39 #if !IUTEST_HAS_LIB
40 namespace { // NOLINT
41 #endif
42 
46 template<typename DMY>
47 struct kStringsT
48 {
49  static const char* const DefaultXmlReportFileName;
50  static const char* const UnknownFile;
51  static const char* const Null;
52 };
53 
54 #if IUTEST_HAS_LIB && IUTEST_HAS_EXTERN_TEMPLATE
55 
56 IUTEST_PRAGMA_EXTERN_TEMPLATE_WARN_DISABLE_BEGIN()
57 
58 extern template struct kStringsT<void>;
59 
60 IUTEST_PRAGMA_EXTERN_TEMPLATE_WARN_DISABLE_END()
61 
62 #else
63 
64 template<typename DMY>
65 const char* const kStringsT<DMY>::DefaultXmlReportFileName = "test_detail.xml";
66 template<typename DMY>
67 const char* const kStringsT<DMY>::UnknownFile = "unknown file";
68 template<typename DMY>
69 const char* const kStringsT<DMY>::Null = "(null)";
70 
71 template struct kStringsT<void>;
72 
73 #endif
74 
75 #if !IUTEST_HAS_LIB
76 } // namespace
77 #endif
78 } // end of namespace helper
79 
81 typedef helper::kStringsT<void> kStrings;
82 
83 #endif
84 
88 struct kValues
89 {
90 #if defined(IUTEST_NO_INCLASS_MEMBER_INITIALIZATION)
91  enum
92  {
93  MaxPrintContainerCount = 32
94  , PrintArrayThreshold = 16
95  , PrintArrayChunksize = PrintArrayThreshold/2
96  };
97 #else
98  static const size_t MaxPrintContainerCount = 32;
99  static const size_t PrintArrayThreshold = 18;
100  static const size_t PrintArrayChunksize = PrintArrayThreshold/2;
101 #endif
102 };
103 
104 } // end of namespace detail
105 } // end of namespace iutest
106 
107 #endif // INCG_IRIS_IUTEST_CONSTANT_HPP_37DDDC13_3259_42E0_A648_47B064DED4BA_
iutest root namespace
Definition: iutest_charcode.hpp:33