iutest  1.17.99.14
iutest_env.hpp
[詳解]
1 //======================================================================
2 //-----------------------------------------------------------------------
13 //-----------------------------------------------------------------------
14 //======================================================================
15 #ifndef INCG_IRIS_IUTEST_ENV_HPP_F4017EAB_6CA3_4E6E_8983_059393DADD04_
16 #define INCG_IRIS_IUTEST_ENV_HPP_F4017EAB_6CA3_4E6E_8983_059393DADD04_
17 
18 //======================================================================
19 // include
20 // IWYU pragma: begin_exports
24 #include "iutest_listener.hpp"
25 // IWYU pragma: end_exports
26 
27 //======================================================================
28 // define
56 #define IUTEST_FLAG(name) IIUT_FLAG(name)
57 
62 #define IIUT_FLAG(name) TestEnv::name()
63 
68 #if IUTEST_HAS_LIB && IUTEST_HAS_EXTERN_TEMPLATE
69 
70 namespace iutest { class Environment; }
71 
72 IUTEST_PRAGMA_EXTERN_TEMPLATE_WARN_DISABLE_BEGIN()
73 
74 extern template class ::std::vector< ::iutest::Environment* >;
75 
76 IUTEST_PRAGMA_EXTERN_TEMPLATE_WARN_DISABLE_END()
77 
78 #endif
79 
80 namespace iutest
81 {
82 
83 //======================================================================
84 // function
88 inline ::std::string EnvironmentString(const char* name)
89 {
90  ::std::string var;
91  detail::GetEnvironmentVariable(name, var);
92  return var;
93 }
94 
95 //======================================================================
96 // class
100 class Environment
101 {
102 public:
103  virtual ~Environment() { Release(); }
104  virtual void SetUp() {}
105  virtual void TearDown() {}
106 private:
107  void Release();
108 private:
109  struct should_be_SetUp {};
110  virtual should_be_SetUp* Setup() IUTEST_CXX_FINAL { return NULL; }
111 };
112 
116 class TestFlag
117 {
118 public:
123  class ScopedGuard
124  {
126 
127  int m_test_flags;
128  public:
129  ScopedGuard()
130  {
131  m_test_flags = TestFlag::GetInstance().m_test_flags;
132  }
133  ~ScopedGuard()
134  {
135  TestFlag::GetInstance().m_test_flags = m_test_flags;
136  }
137  };
138 public:
142  enum Kind
143  {
144  SHUFFLE_TESTS = 0x00000001,
145  RUN_DISABLED_TESTS = 0x00000002,
146  FILTERING_TESTS = 0x00000004,
147 
148  BREAK_ON_FAILURE = 0x00000010,
149  THROW_ON_FAILURE = 0x00000040,
150  WARNING_INTO_ERROR = 0x00000080,
151 
152  CONSOLE_COLOR_ON = 0x00000100,
153  CONSOLE_COLOR_OFF = 0x00000200,
154  CONSOLE_COLOR_ANSI = 0x00000400,
155 
156  PRINT_TIME = 0x00001000,
157  FILELOCATION_STYLE_MSVC = 0x00002000,
158  VERBOSE = 0x00004000,
159 
160  CATCH_EXCEPTION_EACH = 0x00010000,
161  CATCH_EXCEPTION_GLOBAL = 0x00020000,
162  CATCH_EXCEPTION = 0x00030000,
163 
164  SHOW_HELP = 0x01000000,
165  SHOW_VERSION = 0x02000000,
166  SHOW_FEATURE = 0x04000000,
167  SHOW_SPEC = 0x08000000,
168 
169  SHOW_TESTS_LIST = 0x20000000,
171  = 0x40000000,
172 
173  SHOW_INFO_MASK = 0x0F000000,
174  SHOW_MASK = 0x7F000000,
175  MASK = 0x7FFFFFFF,
176 
178 #if defined(_MSC_VER)
180 #else
182 #endif
183  };
184 
185 private:
187  : m_test_flags(DEFAULT) {}
188 
189 public:
191  static TestFlag& GetInstance() { static TestFlag flag; return flag; }
192 public:
199  static void SetFlag(int enable, int mask=-1)
200  {
201  GetInstance().m_test_flags |= enable;
202  GetInstance().m_test_flags &= mask;
203  }
209  static bool IsEnableFlag(int flag) { return (GetInstance().m_test_flags & flag) ? true : false; }
210 
211 private:
212  template<int KIND>
213  class Fragment
214  {
215  typedef Fragment<KIND> _Myt;
216  public:
217  Fragment() IUTEST_CXX_NOEXCEPT_SPEC {}
218  Fragment(bool enabled) { SetFlag(KIND, enabled ? -1 : ~KIND); } // NOLINT
219  _Myt& operator = (bool enabled) { SetFlag(KIND, enabled ? -1 : ~KIND); return *this; }
220  operator bool() const { return IsEnableFlag(KIND); }
221  };
222 
223 private:
224  friend class TestEnv;
225 #if defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
226  friend class ScopedGuard;
227 #endif
228 
229  int m_test_flags;
230 };
231 
232 // declare
233 class TestPartResultReporterInterface;
234 
238 class TestEnv
239 {
240  typedef ::std::vector<Environment*> iuEnvironmentList;
241 
242 public:
247  typedef TestFlag::Fragment<TestFlag::SHUFFLE_TESTS> shuffle;
248  typedef TestFlag::Fragment<TestFlag::RUN_DISABLED_TESTS> also_run_disabled_tests;
249  typedef TestFlag::Fragment<TestFlag::BREAK_ON_FAILURE> break_on_failure;
250  typedef TestFlag::Fragment<TestFlag::CATCH_EXCEPTION> catch_exceptions;
251  typedef TestFlag::Fragment<TestFlag::THROW_ON_FAILURE> throw_on_failure;
252  typedef TestFlag::Fragment<TestFlag::WARNING_INTO_ERROR> warning_into_error;
253  typedef TestFlag::Fragment<TestFlag::PRINT_TIME> print_time;
254  typedef TestFlag::Fragment<TestFlag::SHOW_TESTS_LIST> list_tests;
255  typedef TestFlag::Fragment<TestFlag::SHOW_TESTS_LIST_WITH_WHERE> list_tests_with_where;
256 
257  typedef TestFlag::Fragment<TestFlag::CATCH_EXCEPTION_EACH> catch_exceptions_each;
258  typedef TestFlag::Fragment<TestFlag::CATCH_EXCEPTION_GLOBAL> catch_exceptions_global;
259 
260  typedef TestFlag::Fragment<TestFlag::FILELOCATION_STYLE_MSVC> file_location_style_msvc;
261  typedef TestFlag::Fragment<TestFlag::VERBOSE> verbose;
262 
271  typedef class RandomSeedSet
272  {
273  public:
274  RandomSeedSet() IUTEST_CXX_NOEXCEPT_SPEC {}
275  RandomSeedSet(unsigned int seed) { init_random(seed); }
276  RandomSeedSet& operator = (unsigned int seed) { init_random(seed); return *this; }
277  operator unsigned int() const { return get_random_seed(); }
278  } random_seed;
279 
284  typedef class RepeatCountSet
285  {
286  public:
287  RepeatCountSet() IUTEST_CXX_NOEXCEPT_SPEC {}
288  RepeatCountSet(int count) { set_repeat_count(count); }
289  RepeatCountSet& operator = (int count) { set_repeat_count(count); return *this; }
290  operator int() const { return get_repeat_count(); }
291  } repeat;
292 
293 #if defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
294  friend class RandomSeedSet;
295  friend class RepeatCountSet;
296 #endif
297 
298  template<typename T>
299  class StateVariable
300  {
301  bool m_dirty;
302  T m_value;
303  public:
304  StateVariable& operator = (const T& rhs) { m_value = rhs; m_dirty = true; return *this; }
305  operator const T& () const { return m_value; }
306  const T& operator ()() const { return m_value; }
307  bool is_dirty() const { return m_dirty; }
308  void flush() { m_dirty = false; }
309  T& get() { return m_value; }
310  const T& get() const { return m_value; }
311  };
312 
313 private:
314  struct Variable
315  {
316  Variable()
317  : m_random_seed(0)
318  , m_current_random_seed(0)
319  , m_before_origin_random_seed(0)
320  , m_repeat_count(1)
321  , m_testpartresult_reporter(NULL)
322  {}
323  unsigned int m_random_seed;
324  unsigned int m_current_random_seed;
325  unsigned int m_before_origin_random_seed;
326  int m_repeat_count;
327  StateVariable< ::std::string > m_output_option;
328  ::std::string m_test_filter;
329  ::std::string m_flagfile;
330 #if IUTEST_HAS_STREAM_RESULT
331  StateVariable< ::std::string > m_stream_result_to;
332 #endif
333  ::std::string m_default_package_name;
334  detail::iuRandom m_genrand;
335  iuEnvironmentList m_environment_list;
336  TestEventListeners m_event_listeners;
337  TestPartResultReporterInterface* m_testpartresult_reporter;
338 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
339  iu_stringstream m_ostream_formatter;
340 #endif
341  ::std::string m_locale_ctype;
342  };
343 
344  static Variable& get_vars() { static Variable sVars; return sVars; }
345 
346 private:
347  static const char* get_output_option_c_str() { return get_vars().m_output_option.get().c_str(); }
348 #if IUTEST_HAS_STREAM_RESULT
349  static const char* get_stream_result_to_c_str() { return get_vars().m_stream_result_to.get().c_str(); }
350 #endif
351 
352 public:
353  static detail::iuRandom& genrand() { return get_vars().m_genrand; }
354  static unsigned int get_random_seed() { return get_vars().m_random_seed; }
355  static unsigned int current_random_seed() { return get_vars().m_current_random_seed; }
356  static int get_repeat_count() { return get_vars().m_repeat_count; }
357  static const StateVariable< ::std::string >& get_output_option() { return get_vars().m_output_option; }
358  static const char* get_default_package_name() { return get_vars().m_default_package_name.c_str(); }
359  static const char* test_filter() { return get_vars().m_test_filter.c_str(); }
360  static const char* get_flagfile() { return get_vars().m_flagfile.c_str(); }
361 #if IUTEST_HAS_STREAM_RESULT
362  static const StateVariable< ::std::string >& get_stream_result_to() { return get_vars().m_stream_result_to; }
363 #endif
364 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
365  static void global_ostream_copyfmt(iu_ostream& os) { os.copyfmt(get_vars().m_ostream_formatter); } // NOLINT
366 #endif
367  static const char* get_locale_ctype() { return get_vars().m_locale_ctype.c_str(); }
368  static bool is_specific_locale_ctype() { return !get_vars().m_locale_ctype.empty(); }
369 
373  static ::std::string get_report_xml_filepath();
377  static ::std::string get_report_junit_xml_filepath();
378 
380  static TestEventListeners& event_listeners() { return get_vars().m_event_listeners; }
382  static TestPartResultReporterInterface* GetGlobalTestPartResultReporter()
383  {
384  return get_vars().m_testpartresult_reporter;
385  }
387  static void SetGlobalTestPartResultReporter(TestPartResultReporterInterface* ptr)
388  {
389  get_vars().m_testpartresult_reporter = ptr;
390  }
392  static bool has_output_option()
393  {
394  return !get_vars().m_output_option.get().empty();
395  }
397  static bool is_output_option_dirty()
398  {
399  return get_vars().m_output_option.is_dirty();
400  }
402  static void flush_output_option()
403  {
404  get_vars().m_output_option.flush();
405  }
406 
407 private:
411  static void init_random(unsigned int seed)
412  {
413  get_vars().m_random_seed = seed;
414  }
415 
419  static void set_repeat_count(int count)
420  {
421  get_vars().m_repeat_count = count;
422  }
423 
427  static void set_test_filter(const char* str)
428  {
429  get_vars().m_test_filter = str == NULL ? "*" : str;
431  }
432 
436  static void set_flagfile_path(const char* str)
437  {
438  get_vars().m_flagfile = str;
439  }
440 
444  static void set_flagfile(const char* str)
445  {
446  ParseFlagFileOption(str);
447  LoadFlagFile();
448  }
449 
450 #if IUTEST_HAS_STREAM_RESULT
454  static void set_stream_result_to(const char* str)
455  {
456  get_vars().m_stream_result_to = detail::NullableString(str);
457  }
458 #endif
459 
463  static const char* get_color_option()
464  {
466  {
467  return "ansi";
468  }
470  {
471  return "yes";
472  }
474  {
475  return "no";
476  }
477  return "auto";
478  }
482  static void set_color_option(const char* str)
483  {
484  ParseColorOption(str);
485  }
486 
490  static void set_output_option(const char* str)
491  {
492  get_vars().m_output_option = detail::NullableString(str);
493  }
494 
498  static void set_default_package_name(const char* str)
499  {
500  get_vars().m_default_package_name = detail::NullableString(str);
501  }
502 
506  static void set_locale_ctype(const char* str)
507  {
508  get_vars().m_locale_ctype = detail::NullableString(str);
509  }
510 
511 private:
512  typedef const char* (*pfnOptionStringGet)();
513  typedef void(*pfnOptionStringSet)(const char*);
514  template<pfnOptionStringGet G, pfnOptionStringSet S>
515  class OptionString
516  {
517  typedef OptionString<G, S> _Myt;
518  typedef const _Myt& _Argt;
519  protected:
520  ::std::string m_option;
521  public:
522  friend bool operator == (const char* c_str_, _Argt rhs) { return rhs.m_option == c_str_; }
523  friend bool operator == (const ::std::string& str, _Argt rhs) { return rhs.m_option == str; }
524  friend bool operator == (_Argt lhs, const char* c_str_) { return lhs.m_option == c_str_; }
525  friend bool operator == (_Argt lhs, const ::std::string& str) { return lhs.m_option == str; }
526  friend bool operator != (const char* c_str_, _Argt rhs) { return rhs.m_option != c_str_; }
527  friend bool operator != (const ::std::string& str, _Argt rhs) { return rhs.m_option != str; }
528  friend bool operator != (_Argt lhs, const char* c_str_) { return lhs.m_option != c_str_; }
529  friend bool operator != (_Argt lhs, const ::std::string& str) { return lhs.m_option != str; }
530 
531  operator ::std::string() const { return m_option; }
532  public:
533  bool empty() const { return m_option.empty(); }
534  const char* c_str() const { return m_option.c_str(); }
535  size_t length() const { return m_option.length(); }
536  public:
537  OptionString()
538  : m_option(G())
539  {
540  }
541  const _Myt& operator = (const char* c_str_)
542  {
543  m_option = detail::NullableString(c_str_);
544  S(c_str_);
545  return *this;
546  }
547  const _Myt& operator = (const ::std::string& str)
548  {
549  m_option = str;
550  S(str.c_str());
551  return *this;
552  }
553  };
554 
555 public:
560  typedef OptionString<get_color_option, set_color_option> color;
561 
566  typedef OptionString<test_filter, set_test_filter> filter;
567 
572  typedef OptionString<get_flagfile, set_flagfile> flagfile;
573 
578  typedef OptionString<get_output_option_c_str, set_output_option> output;
579 
580 #if IUTEST_HAS_STREAM_RESULT
585  typedef OptionString<get_stream_result_to_c_str, set_stream_result_to> stream_result_to;
586 #endif
587 
592  typedef OptionString<get_default_package_name, set_default_package_name> default_package_name;
593 
598  typedef OptionString<get_locale_ctype, set_locale_ctype> locale_ctype;
599 
600 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
605  typedef class OStreamFormatter : public iu_stringstream
606  {
607  IUTEST_WORKAROUND_MSC_STLSTREAM_C4250()
608  public:
609  OStreamFormatter()
610  {
611  copyfmt(get_vars().m_ostream_formatter);
612  }
613  virtual ~OStreamFormatter()
614  {
615  get_vars().m_ostream_formatter.copyfmt(*this);
616  }
617  } ostream_formatter;
618 
619 #if defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
620  friend class OStreamFormatter;
621 #endif
622 
623 #endif
624 
625 private:
626  static iuEnvironmentList& environments() { return get_vars().m_environment_list; }
627 
628 public:
634  static Environment* AddGlobalTestEnvironment(Environment* env)
635  {
636  if( env == NULL )
637  {
638  return NULL;
639  }
640  environments().push_back(env);
641  return env;
642  }
643 
649  static Environment* ReleaseGlobalTestEnvironment(Environment* env)
650  {
651  if( env == NULL )
652  {
653  return NULL;
654  }
655  iuEnvironmentList& list = environments();
656  iuEnvironmentList::iterator it = ::std::find(list.begin(), list.end(), env);
657  if( it == list.end() )
658  {
659  return NULL;
660  }
661  list.erase(it);
662  return env;
663  }
664 
668  static ::std::string AddDefaultPackageName(const char* testsuite_name);
669 
670 private:
674  static void ReleaseGlobalTestEnvironment()
675  {
676  // すべて解放する
677  for( iuEnvironmentList::iterator it=environments().begin(); it != environments().end(); )
678  {
679  Environment* p = *it;
680  it = environments().erase(it);
681  delete p;
682  }
683  }
684 
685 public:
690  template<typename CharType>
691  static void ParseCommandLine(int* pargc, CharType** argv)
692  {
693  if( argv == NULL )
694  {
695  return;
696  }
697  int argc = *pargc;
698 
699  for( int i=0; i < argc; )
700  {
701  if( ParseCommandLineElem(argv[i]) )
702  {
703  --argc;
704  // 見つかった場合、オプションを末尾に移動
705  for( int k=i; k < argc; ++k )
706  {
707  CharType* tmp = argv[k];
708  argv[k] = argv[k+1];
709  argv[k+1] = tmp;
710  }
711  }
712  else
713  {
714  ++i;
715  }
716  }
717  *pargc = argc;
718  }
719 
724  template<typename CharType>
725  static void ParseCommandLine(::std::vector< ::std::basic_string<CharType> >& argv)
726  {
727  typedef ::std::vector< ::std::basic_string<CharType> > argv_t;
728  for( typename argv_t::iterator it = argv.begin(); it != argv.end(); )
729  {
730  if( ParseCommandLineElem(it->c_str()) )
731  {
732  it = argv.erase(it);
733  }
734  else
735  {
736  ++it;
737  }
738  }
739  }
740 
742  static bool LoadFlagFile();
743 
744 private:
745  template<typename CharType>
746  static bool ParseCommandLineElem(CharType* argv)
747  {
748  typedef typename detail::mbs_ptr<CharType> formatter;
749 
750  formatter argv_format;
751  const char* str = argv_format.ptr(argv);
752  return ParseCommandLineElemA(str);
753  }
754  static bool ParseCommandLineElemA(const char* str);
755  static bool ParseIutestOptionCommandLineElemA(const char* str);
756  static bool SetFlag(int enable, int mask = -1);
757 
758 private:
762  static void LoadEnvironmentVariable();
763 
767  static void SetUp();
768 
769 private:
773  static inline const char* ParseOptionSettingStr(const char* opt)
774  {
775  const char* eq = strchr(opt, '=');
776  if( eq == NULL )
777  {
778  return NULL;
779  }
780  return eq+1;
781  }
785  static bool ParseColorOption(const char* option);
786 
790  static bool ParseOutputOption(const char* option);
791 
795  static bool ParseFileLocationOption(const char* option);
796 
800  static bool ParseFilterOption(const char* option);
801 
805  static bool ParseFlagFileOption(const char* option);
806 
814  static bool ParseYesNoFlagCommandLine(const char* str, TestFlag::Kind flag, int def);
815 
823  static int ParseYesNoOption(const char* option);
824 
828  static bool IsYes(const char* option);
832  static bool IsNo(const char* option);
833 
834 private:
835  friend class UnitTest;
836 };
837 
841 class iu_global_format_stringstream : public iu_stringstream
842 {
843  IUTEST_WORKAROUND_MSC_STLSTREAM_C4250()
844 public:
846  {
847 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
848  TestEnv::global_ostream_copyfmt(*this);
849 #endif
850  }
851  explicit iu_global_format_stringstream(const char* str)
852  : iu_stringstream(str)
853  {
854 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
855  TestEnv::global_ostream_copyfmt(*this);
856 #endif
857  }
858  explicit iu_global_format_stringstream(const ::std::string& str)
859  : iu_stringstream(str)
860  {
861 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
862  TestEnv::global_ostream_copyfmt(*this);
863 #endif
864  }
865 };
866 
867 template<typename T>
868 inline iu_ostream& operator << (iu_ostream& os, const TestEnv::StateVariable<T>& value)
869 {
870  return os << value.get();
871 }
872 
873 
874 } // end of namespace iutest
875 
876 #if !IUTEST_HAS_LIB
877 # include "impl/iutest_env.ipp" // IWYU pragma: export
878 #endif
879 
880 #endif // INCG_IRIS_IUTEST_ENV_HPP_F4017EAB_6CA3_4E6E_8983_059393DADD04_
環境セットクラス
Definition: iutest_env.hpp:102
virtual void SetUp()
事前処理
Definition: iutest_env.hpp:105
virtual void TearDown()
事後処理
Definition: iutest_env.hpp:106
ファイル処理クラスインターフェイス
Definition: iutest_file.hpp:173
Definition: iutest_env.hpp:301
テスト環境
Definition: iutest_env.hpp:240
static const char * get_default_package_name()
root package オプション
Definition: iutest_env.hpp:359
static const char * get_locale_ctype()
ctype locale オプション
Definition: iutest_env.hpp:368
static Environment * ReleaseGlobalTestEnvironment(Environment *env)
グローバル環境セットクラスの削除
Definition: iutest_env.hpp:650
static const char * get_flagfile()
flag file
Definition: iutest_env.hpp:361
static const StateVariable< ::std::string > & get_output_option()
出力オプション
Definition: iutest_env.hpp:358
::std::string get_report_junit_xml_filepath()
junit xml 出力パスを取得
static const char * test_filter()
フィルター文字列
Definition: iutest_env.hpp:360
static int get_repeat_count()
繰り返し回数
Definition: iutest_env.hpp:357
static detail::iuRandom & genrand()
乱数生成器
Definition: iutest_env.hpp:354
static Environment * AddGlobalTestEnvironment(Environment *env)
グローバル環境セットクラスの追加
Definition: iutest_env.hpp:635
static bool LoadFlagFile()
フラグファイルをロード
static unsigned int current_random_seed()
乱数シード
Definition: iutest_env.hpp:356
static unsigned int get_random_seed()
乱数シード
Definition: iutest_env.hpp:355
::std::string AddDefaultPackageName(const char *testsuite_name)
default package name を追加
::std::string get_report_xml_filepath()
xml 出力パスを取得
イベントリスナーの管理クラス
Definition: iutest_listener.hpp:169
テストフラグ
Definition: iutest_env.hpp:118
Kind
フラグ
Definition: iutest_env.hpp:144
@ SHOW_TESTS_LIST
テストのリスト表示
Definition: iutest_env.hpp:170
@ CONSOLE_COLOR_ANSI
エスケープシーケンスで出力
Definition: iutest_env.hpp:155
@ FILTERING_TESTS
テストのフィルタリング
Definition: iutest_env.hpp:147
@ SHOW_FEATURE
機能の出力
Definition: iutest_env.hpp:167
@ CONSOLE_COLOR_OFF
色つき出力OFF
Definition: iutest_env.hpp:154
@ SHOW_INFO_MASK
情報表示系マスク
Definition: iutest_env.hpp:174
@ BREAK_ON_FAILURE
テスト失敗時にブレーク
Definition: iutest_env.hpp:149
@ MASK
マスク
Definition: iutest_env.hpp:176
@ WARNING_INTO_ERROR
警告をエラーとする
Definition: iutest_env.hpp:151
@ PRINT_TIME
経過時間の出力
Definition: iutest_env.hpp:157
@ VERBOSE
verbose
Definition: iutest_env.hpp:159
@ CATCH_EXCEPTION_EACH
例外を catch する(TestInfo)
Definition: iutest_env.hpp:161
@ DEFAULT
デフォルト
Definition: iutest_env.hpp:182
@ CATCH_EXCEPTION_GLOBAL
例外を catch する(UnitTest)
Definition: iutest_env.hpp:162
@ CATCH_EXCEPTION
例外を catch する
Definition: iutest_env.hpp:163
@ THROW_ON_FAILURE
致命的な失敗時に throw する
Definition: iutest_env.hpp:150
@ SHOW_VERSION
バージョン表示
Definition: iutest_env.hpp:166
@ SHOW_HELP
ヘルプ表示
Definition: iutest_env.hpp:165
@ CONSOLE_COLOR_ON
色つき出力ON
Definition: iutest_env.hpp:153
@ RUN_DISABLED_TESTS
DISABLED テストも実行
Definition: iutest_env.hpp:146
@ SHUFFLE_TESTS
シャッフルテスト
Definition: iutest_env.hpp:145
@ SHOW_SPEC
Specの出力
Definition: iutest_env.hpp:168
@ FILELOCATION_STYLE_MSVC
ファイル/行出力スタイルを Visual Studio スタイルにする
Definition: iutest_env.hpp:158
@ SHOW_TESTS_LIST_WITH_WHERE
テストのリスト表示(with where)
Definition: iutest_env.hpp:171
@ SHOW_MASK
表示系マスク
Definition: iutest_env.hpp:175
static bool IsEnableFlag(int flag)
フラグが立っているかどうか
Definition: iutest_env.hpp:210
static void SetFlag(int enable, int mask=-1)
フラグのビット操作
Definition: iutest_env.hpp:200
テスト結果の通知処理インターフェイス
Definition: iutest_result.hpp:43
ostream_formatter オプションが適用されてた stringstream
Definition: iutest_env.hpp:843
iris unit test 文字コード対応 ファイル
#define IUTEST_CXX_NOEXCEPT_SPEC
noexcept specification definition
Definition: iutest_compiler.hpp:811
iris unit test イベントリスナー 定義 ファイル
#define IUTEST_PP_DISALLOW_COPY_AND_ASSIGN(TypeName)
コピー禁止定義
Definition: iutest_pp.hpp:31
iris unit test 乱数生成器 定義 ファイル
iutest root namespace
Definition: iutest_charcode.hpp:33
inline ::std::string EnvironmentString(const char *name)
環境変数の取得
Definition: iutest_env.hpp:89