|
|
@ -24,16 +24,22 @@ int main(int argc, char* argv[]) |
|
|
|
// Suite
|
|
|
|
TestUnit suite = TestUnit{ "test_processdirs" }; |
|
|
|
|
|
|
|
|
|
|
|
std::string base = TestUnit::getGlobalRootDir() + "test_processdirs/"; |
|
|
|
// 1
|
|
|
|
suite |
|
|
|
.addNew<TestUnit>( |
|
|
|
"node 1", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 1"); |
|
|
|
[=](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}) |
|
|
|
->addNew<TestUnit>("node 1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 1.1"); |
|
|
|
->addNew<TestUnit>("node 1.1", [=](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}); |
|
|
|
|
|
|
@ -41,30 +47,40 @@ int main(int argc, char* argv[]) |
|
|
|
suite |
|
|
|
.addNew<TestUnit>( |
|
|
|
"node 2", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 2"); |
|
|
|
[=](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}) |
|
|
|
->addNew<TestUnit>( |
|
|
|
"node 2.1", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_2_1/", ""); |
|
|
|
[=](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == |
|
|
|
TestUnit::getGlobalRootDir() + "test_processdirs_node_2_node_2_1/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}, |
|
|
|
nullptr, |
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL) |
|
|
|
->addNew<TestUnit>("node 2.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_2_1/", ""); |
|
|
|
->addNew<TestUnit>("node 2.1.1", [=](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == |
|
|
|
TestUnit::getGlobalRootDir() + "test_processdirs_node_2_node_2_1/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 3
|
|
|
|
//3
|
|
|
|
suite |
|
|
|
.addNew<TestUnit>( |
|
|
|
"node 3", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
|
[=](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs_node_3/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}, |
|
|
|
nullptr, |
|
|
@ -72,25 +88,33 @@ int main(int argc, char* argv[]) |
|
|
|
->addNew<TestUnit>( |
|
|
|
"node 3.1", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs_node_3/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}) |
|
|
|
->addNew<TestUnit>( |
|
|
|
"node 3.1.1", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", ""); |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs_node_3/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}) |
|
|
|
->addNew<TestUnit>( |
|
|
|
"node 3.1.1", |
|
|
|
"node 3.1.1.1", |
|
|
|
[](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3_1_1/", ""); |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs_node_3_node_3_1_node_3_1_1_node_3_1_1_1/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}, |
|
|
|
nullptr, |
|
|
|
PityUnit<>::ExecutionMode::PROCESS_PARALLEL) |
|
|
|
->addNew<TestUnit>("node 3.1.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3_1_1/", ""); |
|
|
|
->addNew<TestUnit>("node 3.1.1.1.1", [](TestUnit& pity, TestContext* ctx) { |
|
|
|
PITYASSERT( |
|
|
|
pity.getProcessDir() == TestUnit::getGlobalRootDir() + "test_processdirs_node_3_node_3_1_node_3_1_1_node_3_1_1_1/", |
|
|
|
pity.getProcessDir()); |
|
|
|
return 0; |
|
|
|
}); |
|
|
|
|
|
|
|