-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_test.cpp
81 lines (68 loc) · 1.63 KB
/
main_test.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
#include <omni/omni.hpp>
#include <test/test.hpp>
#include <test/calc.hpp>
#include <test/conf.hpp>
#include <test/util.hpp>
#include <test/misc.hpp>
#include <iostream>
// locals
namespace
{
///////////////////////////////////////////////////////////////////////////////
/// @brief Print the compiler information to standard output stream.
void print_compiler_info()
{
#if defined(__INTEL_COMPILER)
std::cout << "Intel compiler: " << int(__INTEL_COMPILER) << "\n";
#endif
#if defined(__BORLANC__)
std::cout << "Borland compiler: " << int(__BORLANDC__) << "\n";
#endif
#if defined(__GNUC__)
std::cout << "GCC: " << int(__GNUC__) << "\n";
#endif
#if defined(__EDG__) && defined(__COMO__) // Comeau C++
std::cout << "Comeau C++: " << int(__COMO__) << "\n";
#endif
#if defined(_MSC_VER)
std::cout << "MS VS compiler: " << int(_MSC_VER) << "\n";
#endif
}
} // locals
///////////////////////////////////////////////////////////////////////////////
/// @brief The application entry point.
/**
@param[in] argc The number of command line arguments.
@param[in] argv The command line arguments.
*/
int main(int argc, char const* argv[])
{
print_compiler_info();
std::cout << "\n";
try
{
if (0) // explicit test
{
//if (!test_conf(std::cout))
// std::cout << "test FAILED\n";
//else
// std::cout << "test SUCCESS\n";
return 0;
}
//omni::rnd::randomize();
omni::test::UnitTest::testAll(std::cout);
#if !OMNI_DEBUG
//omni::test::SpeedTest::testAll(std::cout);
#endif
}
catch (std::exception const& ex)
{
std::cerr << "\nERROR: "
<< ex.what() << "\n";
}
catch (...)
{
std::cerr << "\nFATAL ERROR!\n";
}
return 0;
}