-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtests.cpp
41 lines (28 loc) · 953 Bytes
/
tests.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
#include "oatpp-test/UnitTest.hpp"
#include <iostream>
namespace {
class Test : public oatpp::test::UnitTest {
public:
Test() : oatpp::test::UnitTest("[MyTest]")
{}
void onRun() override {
OATPP_LOGD(TAG, "Hello Test");
// TODO write correct tests
}
};
void runTests() {
OATPP_RUN_TEST(Test);
}
}
int main() {
oatpp::base::Environment::init();
runTests();
/* Print how much objects were created during app running, and what have left-probably leaked */
/* Disable object counting for release builds using '-D OATPP_DISABLE_ENV_OBJECT_COUNTERS' flag for better performance */
std::cout << "\nEnvironment:\n";
std::cout << "objectsCount = " << oatpp::base::Environment::getObjectsCount() << "\n";
std::cout << "objectsCreated = " << oatpp::base::Environment::getObjectsCreated() << "\n\n";
OATPP_ASSERT(oatpp::base::Environment::getObjectsCount() == 0);
oatpp::base::Environment::destroy();
return 0;
}