iutest  1.17.1.0
main.cpp
//======================================================================
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//======================================================================
/*
* is not available vprintf, can be replaced.
*/
//#define IUTEST_VPRINTF
/*
* include testing framework
*/
#include "../include/iutest.hpp"
#if defined(USE_TAP)
#include "../include/listener/iutest_tap_printer.hpp"
#endif
#if defined(USE_PROGRESS)
#include "../include/listener/iutest_progress_printer.hpp"
#endif
#if defined(USE_SSTPNOTIFIER)
#include "../include/listener/iutest_sstp_notifier.hpp"
#endif
/*--------------------------------------------------*/
class FooEnvironment : public ::iutest::Environment
{
virtual void SetUp()
{
iuutil::Console::output("FooEnvironment::SetUp\n");
}
virtual void TearDown()
{
iuutil::Console::output("FooEnvironment::TearDown\n");
}
};
#if defined(_MSC_VER) && IUTEST_HAS_LIB
#pragma comment(lib, IUTEST_LIB_NAME(libiutest_main) )
#else
#ifdef UNICODE
int wmain(int argc, wchar_t* argv[])
#else
int main(int argc, char* argv[])
#endif
{
#if !defined(IUTEST_OS_WINDOWS_MOBILE)
setlocale(LC_CTYPE, "");
#endif
#if 1
iutest::AddGlobalTestEnvironment(new FooEnvironment());
#endif
//iutest::IUTEST_FLAG(shuffle) = false;
//iutest::IUTEST_FLAG(throw_on_failure) = true;
IUTEST_INIT(&argc, argv);
#if defined(USE_TAP)
#endif
#if defined(USE_PROGRESS)
#endif
#if defined(USE_SSTPNOTIFIER)
::iutest::SSTPNotifier::SetUp("localhost");
#endif
//::iuutil::QuietResultPrinter::SetUp();
}
#endif
iutest::AddGlobalTestEnvironment
Environment *IUTEST_ATTRIBUTE_UNUSED_ AddGlobalTestEnvironment(Environment *env)
グローバル環境セットクラスの追加
Definition: iutest.hpp:1950
main
int main(int argc, char **argv)
default main
Definition: iutest_default_main.hpp:28
iutest::Environment
環境セットクラス
Definition: iutest_env.hpp:99
iutest::TAPPrintListener::SetUp
static TestEventListener * SetUp()
TAPPrintListener に切り替え
Definition: iutest_tap_printer.hpp:49
IUTEST_INIT
#define IUTEST_INIT(argc_, argv_)
iutest の初期化処理
Definition: iutest.hpp:148
iutest::ProgressPrintListener::SetUp
static TestEventListener * SetUp()
ProgressPrintListener に切り替え
Definition: iutest_progress_printer.hpp:49
IUTEST_RUN_ALL_TESTS
#define IUTEST_RUN_ALL_TESTS()
すべてのテストを実行する
Definition: iutest.hpp:154