-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.cpp
92 lines (76 loc) · 2.16 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//======================================================================
//-----------------------------------------------------------------------
/**
* @file main.cpp
* @brief sample main ファイル
*
* @author t.shirayanagi
* @par copyright
* Copyright (C) 2011-2022, Takazumi Shirayanagi\n
* This software is released under the new BSD License,
* see LICENSE
*/
//-----------------------------------------------------------------------
//======================================================================
/*
* 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
/** --------------------------------------------------
* Environment サンプル
*//*--------------------------------------------------*/
class FooEnvironment : public ::iutest::Environment
{
virtual void SetUp() IUTEST_CXX_OVERRIDE
{
iuutil::Console::output("FooEnvironment::SetUp\n");
}
virtual void TearDown() IUTEST_CXX_OVERRIDE
{
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)
::iutest::TAPPrintListener::SetUp();
#endif
#if defined(USE_PROGRESS)
::iutest::ProgressPrintListener::SetUp();
#endif
#if defined(USE_SSTPNOTIFIER)
::iutest::SSTPNotifier::SetUp("localhost");
#endif
//::iuutil::QuietResultPrinter::SetUp();
return IUTEST_RUN_ALL_TESTS();
}
#endif