Use UnitTest-Cpp library for testing
This commit is contained in:
parent
ecaa2bbdfb
commit
00d8fa0886
53 changed files with 1046 additions and 1383 deletions
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
#include "UnitTest++/UnitTest++.h"
|
||||
|
||||
#include "Debugging.hpp"
|
||||
#include "Testing.hpp"
|
||||
#include "Utils.hpp"
|
||||
|
||||
#include <cstdio>
|
||||
|
|
@ -42,22 +43,23 @@ void root() {
|
|||
third();
|
||||
}
|
||||
|
||||
TEST_DEF(Debugging) {
|
||||
root();
|
||||
SUITE(Utils) {
|
||||
TEST(CallStackCapture) {
|
||||
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, nullptr };
|
||||
tp::ModuleManifest testModule("UtilsTest", nullptr, nullptr, deps);
|
||||
|
||||
gCSCapture->logAll();
|
||||
}
|
||||
REQUIRE CHECK(testModule.initialize());
|
||||
|
||||
int main() {
|
||||
root();
|
||||
|
||||
tp::ModuleManifest* deps[] = { &tp::gModuleUtils, nullptr };
|
||||
tp::ModuleManifest testModule("UtilsTest", nullptr, nullptr, deps);
|
||||
gCSCapture->logAll();
|
||||
|
||||
if (!testModule.initialize()) {
|
||||
return 1;
|
||||
testModule.deinitialize();
|
||||
}
|
||||
|
||||
testDebugging();
|
||||
TEST(CAllStackCaptureContent) {
|
||||
CHECK(false);
|
||||
}
|
||||
}
|
||||
|
||||
testModule.deinitialize();
|
||||
}
|
||||
int main() { return UnitTest::RunAllTests(); }
|
||||
Loading…
Add table
Add a link
Reference in a new issue