nlib
testing.h
Go to the documentation of this file.
1 
2 #pragma once
3 #ifndef INCLUDE_NN_NLIB_TESTING_TESTING_H_
4 #define INCLUDE_NN_NLIB_TESTING_TESTING_H_
5 
6 #include "nn/nlib/Config.h"
7 
8 #ifndef NLIB_USE_GTEST
10 #include "nn/nlib/testing/Pred.h"
14 
15 namespace testing = ::nlib_ns::testing;
16 NLIB_NAMESPACE_BEGIN
17 namespace testing {
18 inline void InitGoogleTest(int* argc, char** argv) { InitNintendoTest(argc, argv); }
19 inline void InitGoogleTest(int* argc, wchar_t** argv) { InitNintendoTest(argc, argv); }
20 #define NLIB_TESTING_OSTREAM ::nlib_ns::testing::detail_func::DummyStream
21 } // namespace testing
22 NLIB_NAMESPACE_END
23 #else
24 // See: https://code.google.com/p/googletest/
25 #include "gtest/gtest.h"
26 
27 #define NLIB_TESTING_OSTREAM std::ostream
28 namespace testing {
29 inline void InitNintendoTest(int* argc, char** argv) { InitGoogleTest(argc, argv); }
30 inline void InitNintendoTest(int* argc, wchar_t** argv) { InitGoogleTest(argc, argv); }
31 }
32 
33 #endif
34 
35 #endif // INCLUDE_NN_NLIB_TESTING_TESTING_H_
Controls display when tests fails.
Defines a test that parameterizes values.
void InitNintendoTest(int *argc, char **argv)
Processes command-line options for the test program.
Defines a typed test.
A file that contains the configuration information for each development environment.
Defines the macro for a basic, simple test.
Defines a predicate assertion.