iutest  1.17.1.0
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
23 #include "iutest_listener.hpp"
24 
25 //======================================================================
26 // define
54 #define IUTEST_FLAG(name) IIUT_FLAG(name)
55 
60 #define IIUT_FLAG(name) TestEnv::name()
61 
66 #if IUTEST_HAS_LIB && IUTEST_HAS_EXTERN_TEMPLATE
67 
68 namespace iutest { class Environment; }
69 
70 IUTEST_PRAGMA_EXTERN_TEMPLATE_WARN_DISABLE_BEGIN()
71 
72 extern template class ::std::vector< ::iutest::Environment* >;
73 
74 IUTEST_PRAGMA_EXTERN_TEMPLATE_WARN_DISABLE_END()
75 
76 #endif
77 
78 namespace iutest
79 {
80 
81 //======================================================================
82 // function
86 inline ::std::string EnvironmentString(const char* name)
87 {
88  ::std::string var;
89  detail::GetEnvironmentVariable(name, var);
90  return var;
91 }
92 
93 //======================================================================
94 // class
98 class Environment
99 {
100 public:
101  virtual ~Environment() { Release(); }
102  virtual void SetUp() {}
103  virtual void TearDown() {}
104 private:
105  void Release();
106 private:
107  struct should_be_SetUp {};
108  virtual should_be_SetUp* Setup() IUTEST_CXX_FINAL { return NULL; }
109 };
110 
114 class TestFlag
115 {
116 public:
121  class ScopedGuard
122  {
124 
125  int m_test_flags;
126  public:
127  ScopedGuard()
128  {
129  m_test_flags = TestFlag::GetInstance().m_test_flags;
130  }
131  ~ScopedGuard()
132  {
133  TestFlag::GetInstance().m_test_flags = m_test_flags;
134  }
135  };
136 public:
140  enum Kind
141  {
142  SHUFFLE_TESTS = 0x00000001,
143  RUN_DISABLED_TESTS = 0x00000002,
144  FILTERING_TESTS = 0x00000004,
145 
146  BREAK_ON_FAILURE = 0x00000010,
147  THROW_ON_FAILURE = 0x00000040,
148  WARNING_INTO_ERROR = 0x00000080,
149 
150  CONSOLE_COLOR_ON = 0x00000100,
151  CONSOLE_COLOR_OFF = 0x00000200,
152  CONSOLE_COLOR_ANSI = 0x00000400,
153 
154  PRINT_TIME = 0x00001000,
155  FILELOCATION_STYLE_MSVC = 0x00002000,
156  VERBOSE = 0x00004000,
157 
158  CATCH_EXCEPTION_EACH = 0x00010000,
159  CATCH_EXCEPTION_GLOBAL = 0x00020000,
160  CATCH_EXCEPTION = 0x00030000,
161 
162  SHOW_HELP = 0x01000000,
163  SHOW_VERSION = 0x02000000,
164  SHOW_FEATURE = 0x04000000,
165  SHOW_SPEC = 0x08000000,
166 
167  SHOW_TESTS_LIST = 0x20000000,
169  = 0x40000000,
170 
171  SHOW_INFO_MASK = 0x0F000000,
172  SHOW_MASK = 0x7F000000,
173  MASK = 0x7FFFFFFF,
174 
176 #if defined(_MSC_VER)
178 #else
180 #endif
181  };
182 
183 private:
185  : m_test_flags(DEFAULT) {}
186 
187 public:
189  static TestFlag& GetInstance() { static TestFlag flag; return flag; }
190 public:
197  static void SetFlag(int enable, int mask=-1)
198  {
199  GetInstance().m_test_flags |= enable;
200  GetInstance().m_test_flags &= mask;
201  }
207  static bool IsEnableFlag(int flag) { return GetInstance().m_test_flags & flag ? true : false; }
208 
209 private:
210  template<int KIND>
211  class Fragment
212  {
213  typedef Fragment<KIND> _Myt;
214  public:
215  Fragment() IUTEST_CXX_NOEXCEPT_SPEC {}
216  Fragment(bool enabled) { SetFlag(KIND, enabled ? -1 : ~KIND); } // NOLINT
217  _Myt& operator = (bool enabled) { SetFlag(KIND, enabled ? -1 : ~KIND); return *this; }
218  operator bool() const { return IsEnableFlag(KIND); }
219  };
220 
221 private:
222  friend class TestEnv;
223 #if defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
224  friend class ScopedGuard;
225 #endif
226 
227  int m_test_flags;
228 };
229 
230 // declare
231 class TestPartResultReporterInterface;
232 
236 class TestEnv
237 {
238  typedef ::std::vector<Environment*> iuEnvironmentList;
239 
240 public:
245  typedef TestFlag::Fragment<TestFlag::SHUFFLE_TESTS> shuffle;
246  typedef TestFlag::Fragment<TestFlag::RUN_DISABLED_TESTS> also_run_disabled_tests;
247  typedef TestFlag::Fragment<TestFlag::BREAK_ON_FAILURE> break_on_failure;
248  typedef TestFlag::Fragment<TestFlag::CATCH_EXCEPTION> catch_exceptions;
249  typedef TestFlag::Fragment<TestFlag::THROW_ON_FAILURE> throw_on_failure;
250  typedef TestFlag::Fragment<TestFlag::WARNING_INTO_ERROR> warning_into_error;
251  typedef TestFlag::Fragment<TestFlag::PRINT_TIME> print_time;
252  typedef TestFlag::Fragment<TestFlag::SHOW_TESTS_LIST> list_tests;
253  typedef TestFlag::Fragment<TestFlag::SHOW_TESTS_LIST_WITH_WHERE> list_tests_with_where;
254 
255  typedef TestFlag::Fragment<TestFlag::CATCH_EXCEPTION_EACH> catch_exceptions_each;
256  typedef TestFlag::Fragment<TestFlag::CATCH_EXCEPTION_GLOBAL> catch_exceptions_global;
257 
258  typedef TestFlag::Fragment<TestFlag::FILELOCATION_STYLE_MSVC> file_location_style_msvc;
259  typedef TestFlag::Fragment<TestFlag::VERBOSE> verbose;
260 
269  typedef class RandomSeedSet
270  {
271  public:
272  RandomSeedSet() IUTEST_CXX_NOEXCEPT_SPEC {}
273  RandomSeedSet(unsigned int seed) { init_random(seed); }
274  RandomSeedSet& operator = (unsigned int seed) { init_random(seed); return *this; }
275  operator unsigned int() const { return get_random_seed(); }
276  } random_seed;
277 
282  typedef class RepeatCountSet
283  {
284  public:
285  RepeatCountSet() IUTEST_CXX_NOEXCEPT_SPEC {}
286  RepeatCountSet(int count) { set_repeat_count(count); }
287  RepeatCountSet& operator = (int count) { set_repeat_count(count); return *this; }
288  operator int() const { return get_repeat_count(); }
289  } repeat;
290 
291 #if defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
292  friend class RandomSeedSet;
293  friend class RepeatCountSet;
294 #endif
295 
296 private:
297  struct Variable
298  {
299  Variable()
300  : m_random_seed(0)
301  , m_current_random_seed(0)
302  , m_before_origin_random_seed(0)
303  , m_repeat_count(1)
304  , m_testpartresult_reporter(NULL)
305  {}
306  unsigned int m_random_seed;
307  unsigned int m_current_random_seed;
308  unsigned int m_before_origin_random_seed;
309  int m_repeat_count;
310  ::std::string m_output_option;
311  ::std::string m_test_filter;
312  ::std::string m_flagfile;
313 #if IUTEST_HAS_STREAM_RESULT
314  ::std::string m_stream_result_to;
315 #endif
316  ::std::string m_default_package_name;
317  detail::iuRandom m_genrand;
318  iuEnvironmentList m_environment_list;
319  TestEventListeners m_event_listeners;
320  TestPartResultReporterInterface* m_testpartresult_reporter;
321 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
322  iu_stringstream m_ostream_formatter;
323 #endif
324  ::std::string m_locale_ctype;
325  };
326 
327  static Variable& get_vars() { static Variable sVars; return sVars; }
328 
329 public:
330  static detail::iuRandom& genrand() { return get_vars().m_genrand; }
331  static unsigned int get_random_seed() { return get_vars().m_random_seed; }
332  static unsigned int current_random_seed() { return get_vars().m_current_random_seed; }
333  static int get_repeat_count() { return get_vars().m_repeat_count; }
334  static const char* get_output_option() { return get_vars().m_output_option.c_str(); }
335  static const char* get_default_package_name() { return get_vars().m_default_package_name.c_str(); }
336  static const char* test_filter() { return get_vars().m_test_filter.c_str(); }
337  static const char* get_flagfile() { return get_vars().m_flagfile.c_str(); }
338 #if IUTEST_HAS_STREAM_RESULT
339  static const char* get_stream_result_to() { return get_vars().m_stream_result_to.c_str(); }
340 #endif
341 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
342  static void global_ostream_copyfmt(iu_ostream& os) { os.copyfmt(get_vars().m_ostream_formatter); } // NOLINT
343 #endif
344  static const char* get_locale_ctype() { return get_vars().m_locale_ctype.c_str(); }
345  static bool is_specific_locale_ctype() { return !get_vars().m_locale_ctype.empty(); }
346 
350  static ::std::string get_report_xml_filepath();
354  static ::std::string get_report_junit_xml_filepath();
355 
357  static TestEventListeners& event_listeners() { return get_vars().m_event_listeners; }
359  static TestPartResultReporterInterface* GetGlobalTestPartResultReporter()
360  {
361  return get_vars().m_testpartresult_reporter;
362  }
364  static void SetGlobalTestPartResultReporter(TestPartResultReporterInterface* ptr)
365  {
366  get_vars().m_testpartresult_reporter = ptr;
367  }
369  static bool has_output_option()
370  {
371  return !get_vars().m_output_option.empty();
372  }
373 
374 private:
378  static void init_random(unsigned int seed)
379  {
380  get_vars().m_random_seed = seed;
381  }
382 
386  static void set_repeat_count(int count)
387  {
388  get_vars().m_repeat_count = count;
389  }
390 
394  static void set_test_filter(const char* str)
395  {
396  get_vars().m_test_filter = str == NULL ? "*" : str;
398  }
399 
403  static void set_flagfile_path(const char* str)
404  {
405  get_vars().m_flagfile = str;
406  }
407 
411  static void set_flagfile(const char* str)
412  {
413  ParseFlagFileOption(str);
414  LoadFlagFile();
415  }
416 
417 #if IUTEST_HAS_STREAM_RESULT
418 
421  static void set_stream_result_to(const char* str)
422  {
423  get_vars().m_stream_result_to = detail::NullableString(str);
424  }
425 #endif
426 
430  static const char* get_color_option()
431  {
433  {
434  return "ansi";
435  }
437  {
438  return "yes";
439  }
441  {
442  return "no";
443  }
444  return "auto";
445  }
449  static void set_color_option(const char* str)
450  {
451  ParseColorOption(str);
452  }
453 
457  static void set_output_option(const char* str)
458  {
459  get_vars().m_output_option = detail::NullableString(str);
460  }
461 
465  static void set_default_package_name(const char* str)
466  {
467  get_vars().m_default_package_name = detail::NullableString(str);
468  }
469 
473  static void set_locale_ctype(const char* str)
474  {
475  get_vars().m_locale_ctype = detail::NullableString(str);
476  }
477 
478 private:
479  typedef const char* (*pfnOptionStringGet)();
480  typedef void(*pfnOptionStringSet)(const char*);
481  template<pfnOptionStringGet G, pfnOptionStringSet S>
482  class OptionString
483  {
484  typedef OptionString<G, S> _Myt;
485  typedef const _Myt& _Argt;
486  protected:
487  ::std::string m_option;
488  public:
489  friend bool operator == (const char* c_str_, _Argt rhs) { return rhs.m_option == c_str_; }
490  friend bool operator == (const ::std::string& str, _Argt rhs) { return rhs.m_option == str; }
491  friend bool operator == (_Argt lhs, const char* c_str_) { return lhs.m_option == c_str_; }
492  friend bool operator == (_Argt lhs, const ::std::string& str) { return lhs.m_option == str; }
493  friend bool operator != (const char* c_str_, _Argt rhs) { return rhs.m_option != c_str_; }
494  friend bool operator != (const ::std::string& str, _Argt rhs) { return rhs.m_option != str; }
495  friend bool operator != (_Argt lhs, const char* c_str_) { return lhs.m_option != c_str_; }
496  friend bool operator != (_Argt lhs, const ::std::string& str) { return lhs.m_option != str; }
497 
498  operator ::std::string() const { return m_option; }
499  public:
500  bool empty() const { return m_option.empty(); }
501  const char* c_str() const { return m_option.c_str(); }
502  size_t length() const { return m_option.length(); }
503  public:
504  OptionString()
505  : m_option(G())
506  {
507  }
508  const _Myt& operator = (const char* c_str_)
509  {
510  m_option = detail::NullableString(c_str_);
511  S(c_str_);
512  return *this;
513  }
514  const _Myt& operator = (const ::std::string& str)
515  {
516  m_option = str;
517  S(str.c_str());
518  return *this;
519  }
520  };
521 
522 public:
527  typedef OptionString<get_color_option, set_color_option> color;
528 
533  typedef OptionString<test_filter, set_test_filter> filter;
534 
539  typedef OptionString<get_flagfile, set_flagfile> flagfile;
540 
545  typedef OptionString<get_output_option, set_output_option> output;
546 
547 #if IUTEST_HAS_STREAM_RESULT
548 
552  typedef OptionString<get_stream_result_to, set_stream_result_to> stream_result_to;
553 #endif
554 
559  typedef OptionString<get_default_package_name, set_default_package_name> default_package_name;
560 
565  typedef OptionString<get_locale_ctype, set_locale_ctype> locale_ctype;
566 
567 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
568 
572  typedef class OStreamFormatter : public iu_stringstream
573  {
574  IUTEST_WORKAROUND_MSC_STLSTREAM_C4250()
575  public:
576  OStreamFormatter()
577  {
578  copyfmt(get_vars().m_ostream_formatter);
579  }
580  virtual ~OStreamFormatter()
581  {
582  get_vars().m_ostream_formatter.copyfmt(*this);
583  }
584  } ostream_formatter;
585 
586 #if defined(IUTEST_NO_PRIVATE_IN_AGGREGATE)
587  friend class OStreamFormatter;
588 #endif
589 
590 #endif
591 
592 private:
593  static iuEnvironmentList& environments() { return get_vars().m_environment_list; }
594 
595 public:
602  {
603  if( env == NULL )
604  {
605  return NULL;
606  }
607  environments().push_back(env);
608  return env;
609  }
610 
616  static Environment* ReleaseGlobalTestEnvironment(Environment* env)
617  {
618  if( env == NULL )
619  {
620  return NULL;
621  }
622  iuEnvironmentList& list = environments();
623  iuEnvironmentList::iterator it = ::std::find(list.begin(), list.end(), env);
624  if( it == list.end() )
625  {
626  return NULL;
627  }
628  list.erase(it);
629  return env;
630  }
631 
635  static ::std::string AddDefaultPackageName(const char* testcase_name);
636 
637 private:
641  static void ReleaseGlobalTestEnvironment()
642  {
643  // すべて解放する
644  for( iuEnvironmentList::iterator it=environments().begin(); it != environments().end(); )
645  {
646  Environment* p = *it;
647  it = environments().erase(it);
648  delete p;
649  }
650  }
651 
652 public:
657  template<typename CharType>
658  static void ParseCommandLine(int* pargc, CharType** argv)
659  {
660  if( argv == NULL )
661  {
662  return;
663  }
664  int argc = *pargc;
665 
666  for( int i=0; i < argc; )
667  {
668  if( ParseCommandLineElem(argv[i]) )
669  {
670  --argc;
671  // 見つかった場合、オプションを末尾に移動
672  for( int k=i; k < argc; ++k )
673  {
674  CharType* tmp = argv[k];
675  argv[k] = argv[k+1];
676  argv[k+1] = tmp;
677  }
678  }
679  else
680  {
681  ++i;
682  }
683  }
684  *pargc = argc;
685  }
686 
691  template<typename CharType>
692  static void ParseCommandLine(::std::vector< ::std::basic_string<CharType> >& argv)
693  {
694  typedef ::std::vector< ::std::basic_string<CharType> > argv_t;
695  for( typename argv_t::iterator it = argv.begin(); it != argv.end(); )
696  {
697  if( ParseCommandLineElem(it->c_str()) )
698  {
699  it = argv.erase(it);
700  }
701  else
702  {
703  ++it;
704  }
705  }
706  }
707 
709  static bool LoadFlagFile();
710 
711 private:
712  template<typename CharType>
713  static bool ParseCommandLineElem(CharType* argv)
714  {
715  typedef typename detail::mbs_ptr<CharType> formatter;
716 
717  formatter argv_format;
718  const char* str = argv_format.ptr(argv);
719  return ParseCommandLineElemA(str);
720  }
721  static bool ParseCommandLineElemA(const char* str);
722  static bool ParseIutestOptionCommandLineElemA(const char* str);
723  static bool SetFlag(int enable, int mask = -1);
724 
725 private:
729  static void LoadEnvironmentVariable();
730 
734  static void SetUp();
735 
736 private:
740  static inline const char* ParseOptionSettingStr(const char* opt)
741  {
742  const char* eq = strchr(opt, '=');
743  if( eq == NULL )
744  {
745  return NULL;
746  }
747  return eq+1;
748  }
752  static bool ParseColorOption(const char* option);
753 
757  static bool ParseOutputOption(const char* option);
758 
762  static bool ParseFileLocationOption(const char* option);
763 
767  static bool ParseFilterOption(const char* option);
768 
772  static bool ParseFlagFileOption(const char* option);
773 
781  static bool ParseYesNoFlagCommandLine(const char* str, TestFlag::Kind flag, int def);
782 
790  static int ParseYesNoOption(const char* option);
791 
795  static bool IsYes(const char* option);
799  static bool IsNo(const char* option);
800 
801 private:
802  friend class UnitTest;
803 };
804 
808 class iu_global_format_stringstream : public iu_stringstream
809 {
810  IUTEST_WORKAROUND_MSC_STLSTREAM_C4250()
811 public:
813  {
814 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
815  TestEnv::global_ostream_copyfmt(*this);
816 #endif
817  }
818  explicit iu_global_format_stringstream(const char* str)
819  : iu_stringstream(str)
820  {
821 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
822  TestEnv::global_ostream_copyfmt(*this);
823 #endif
824  }
825  explicit iu_global_format_stringstream(const ::std::string& str)
826  : iu_stringstream(str)
827  {
828 #if IUTEST_HAS_STRINGSTREAM || IUTEST_HAS_STRSTREAM
829  TestEnv::global_ostream_copyfmt(*this);
830 #endif
831  }
832 };
833 
834 } // end of namespace iutest
835 
836 #if !IUTEST_HAS_LIB
837 # include "impl/iutest_env.ipp"
838 #endif
839 
840 #endif // INCG_IRIS_IUTEST_ENV_HPP_F4017EAB_6CA3_4E6E_8983_059393DADD04_
iutest::TestFlag::THROW_ON_FAILURE
@ THROW_ON_FAILURE
致命的な失敗時に throw する
Definition: iutest_env.hpp:148
iutest::TestEnv::AddDefaultPackageName
::std::string AddDefaultPackageName(const char *testcase_name)
default package name を追加
iutest::TestFlag::Kind
Kind
フラグ
Definition: iutest_env.hpp:141
iutest::TestEnv::ReleaseGlobalTestEnvironment
static Environment * ReleaseGlobalTestEnvironment(Environment *env)
グローバル環境セットクラスの削除
Definition: iutest_env.hpp:617
iutest::TestPartResultReporterInterface
テスト結果の通知処理インターフェイス
Definition: iutest_result.hpp:40
iutest::TestFlag::SHOW_VERSION
@ SHOW_VERSION
バージョン表示
Definition: iutest_env.hpp:164
iutest::TestEnv::LoadFlagFile
static bool LoadFlagFile()
フラグファイルをロード
iutest::TestFlag::SHOW_INFO_MASK
@ SHOW_INFO_MASK
情報表示系マスク
Definition: iutest_env.hpp:172
iutest::TestFlag::CONSOLE_COLOR_OFF
@ CONSOLE_COLOR_OFF
色つき出力OFF
Definition: iutest_env.hpp:152
iutest::TestEnv::get_report_junit_xml_filepath
::std::string get_report_junit_xml_filepath()
junit xml 出力パスを取得
iutest::EnvironmentString
inline ::std::string EnvironmentString(const char *name)
環境変数の取得
Definition: iutest_env.hpp:87
iutest_config.hpp
iris unit test config
IUTEST_CXX_NOEXCEPT_SPEC
#define IUTEST_CXX_NOEXCEPT_SPEC
noexcept specification definition
Definition: iutest_compiler.hpp:734
iutest::TestFlag::CONSOLE_COLOR_ANSI
@ CONSOLE_COLOR_ANSI
エスケープシーケンスで出力
Definition: iutest_env.hpp:153
iutest::TestFlag::FILELOCATION_STYLE_MSVC
@ FILELOCATION_STYLE_MSVC
ファイル/行出力スタイルを Visual Studio スタイルにする
Definition: iutest_env.hpp:156
iutest::TestFlag::SHOW_SPEC
@ SHOW_SPEC
Specの出力
Definition: iutest_env.hpp:166
iutest
iutest root namespace
Definition: iutest_charcode.hpp:31
iutest::Environment
環境セットクラス
Definition: iutest_env.hpp:99
iutest::TestFlag::SetFlag
static void SetFlag(int enable, int mask=-1)
フラグのビット操作
Definition: iutest_env.hpp:198
IUTEST_CXX_FINAL
#define IUTEST_CXX_FINAL
final definition
Definition: iutest_compiler.hpp:679
iutest_regex.hpp
regex
iutest::TestFlag
テストフラグ
Definition: iutest_env.hpp:115
iutest::iu_global_format_stringstream
ostream_formatter オプションが適用されてた stringstream
Definition: iutest_env.hpp:809
iutest_listener.hpp
iris unit test イベントリスナー 定義 ファイル
iutest::TestFlag::RUN_DISABLED_TESTS
@ RUN_DISABLED_TESTS
DISABLED テストも実行
Definition: iutest_env.hpp:144
iutest::TestFlag::CATCH_EXCEPTION
@ CATCH_EXCEPTION
例外を catch する
Definition: iutest_env.hpp:161
iutest::TestFlag::SHOW_FEATURE
@ SHOW_FEATURE
機能の出力
Definition: iutest_env.hpp:165
iutest_random.hpp
iris unit test 乱数生成器 定義 ファイル
iutest::TestFlag::SHOW_TESTS_LIST_WITH_WHERE
@ SHOW_TESTS_LIST_WITH_WHERE
テストのリスト表示(with where)
Definition: iutest_env.hpp:169
iutest::TestFlag::DEFAULT
@ DEFAULT
デフォルト
Definition: iutest_env.hpp:180
IUTEST_PP_DISALLOW_COPY_AND_ASSIGN
#define IUTEST_PP_DISALLOW_COPY_AND_ASSIGN(TypeName)
コピー禁止定義
Definition: iutest_pp.hpp:25
iutest::TestEnv::get_report_xml_filepath
::std::string get_report_xml_filepath()
xml 出力パスを取得
iutest::TestEnv
テスト環境
Definition: iutest_env.hpp:237
iutest::TestFlag::CONSOLE_COLOR_ON
@ CONSOLE_COLOR_ON
色つき出力ON
Definition: iutest_env.hpp:151
iutest::TestFlag::VERBOSE
@ VERBOSE
verbose
Definition: iutest_env.hpp:157
iutest::TestFlag::SHOW_MASK
@ SHOW_MASK
表示系マスク
Definition: iutest_env.hpp:173
iutest::TestFlag::PRINT_TIME
@ PRINT_TIME
経過時間の出力
Definition: iutest_env.hpp:155
iutest::TestFlag::SHUFFLE_TESTS
@ SHUFFLE_TESTS
シャッフルテスト
Definition: iutest_env.hpp:143
iutest::TestFlag::SHOW_HELP
@ SHOW_HELP
ヘルプ表示
Definition: iutest_env.hpp:163
iutest::TestFlag::WARNING_INTO_ERROR
@ WARNING_INTO_ERROR
警告をエラーとする
Definition: iutest_env.hpp:149
iutest::TestFlag::BREAK_ON_FAILURE
@ BREAK_ON_FAILURE
テスト失敗時にブレーク
Definition: iutest_env.hpp:147
iutest::TestFlag::MASK
@ MASK
マスク
Definition: iutest_env.hpp:174
iutest::TestEventListeners
イベントリスナーの管理クラス
Definition: iutest_listener.hpp:158
iutest::TestFlag::IsEnableFlag
static bool IsEnableFlag(int flag)
フラグが立っているかどうか
Definition: iutest_env.hpp:208
iutest::TestFlag::CATCH_EXCEPTION_GLOBAL
@ CATCH_EXCEPTION_GLOBAL
例外を catch する(UnitTest)
Definition: iutest_env.hpp:160
iutest_charcode.hpp
iris unit test 文字コード対応 ファイル
iutest::TestFlag::CATCH_EXCEPTION_EACH
@ CATCH_EXCEPTION_EACH
例外を catch する(TestInfo)
Definition: iutest_env.hpp:159
iutest::TestFlag::SHOW_TESTS_LIST
@ SHOW_TESTS_LIST
テストのリスト表示
Definition: iutest_env.hpp:168
iutest::TestFlag::FILTERING_TESTS
@ FILTERING_TESTS
テストのフィルタリング
Definition: iutest_env.hpp:145
iutest::TestEnv::AddGlobalTestEnvironment
static Environment * AddGlobalTestEnvironment(Environment *env)
グローバル環境セットクラスの追加
Definition: iutest_env.hpp:602