Browse Source

Test: PityTest - update tests

master
heck 5 months ago
parent
commit
e57d1c6b61
2 changed files with 13 additions and 12 deletions
  1. +2
    -1
      test/test_linear.cc
  2. +11
    -11
      test/test_processdirs.cc

+ 2
- 1
test/test_linear.cc View File

@ -6,9 +6,10 @@ using namespace std;
using namespace pEp;
using namespace pEp::PityTest11;
// eeks_test
// eeks-test
// The test framework for geeks without the g
class Car {
private:
int gear_nr = 0;


+ 11
- 11
test/test_processdirs.cc View File

@ -14,7 +14,7 @@ void printHomeDir(TestUnit& myself)
{
// TESTLOG(string(myself.getFQName() + " - PID: " + to_string(getpid())));
// cout << "[" << to_string(getpid()) << "/" << myself.getFQName() << "] - " << endl;
setenv("HOME", myself.processDir().c_str(), 1);
setenv("HOME", myself.getProcessDir().c_str(), 1);
myself.log("HOME=" + string(getenv("HOME")));
}
@ -29,11 +29,11 @@ int main(int argc, char* argv[])
.addNew<TestUnit>(
"node 1",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 1");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 1");
return 0;
})
.addNew<TestUnit>("node 1.1", [](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 1.1");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 1.1");
return 0;
});
@ -42,19 +42,19 @@ int main(int argc, char* argv[])
.addNew<TestUnit>(
"node 2",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/", "node 2");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/", "node 2");
return 0;
})
.addNew<TestUnit>(
"node 2.1",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_2_1/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_2_1/", "");
return 0;
},
nullptr,
PityUnit<>::ExecutionMode::PROCESS_PARALLEL)
.addNew<TestUnit>("node 2.1.1", [](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_2_1/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_2_1/", "");
return 0;
});
@ -64,7 +64,7 @@ int main(int argc, char* argv[])
.addNew<TestUnit>(
"node 3",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", "");
return 0;
},
nullptr,
@ -72,25 +72,25 @@ int main(int argc, char* argv[])
.addNew<TestUnit>(
"node 3.1",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", "");
return 0;
})
.addNew<TestUnit>(
"node 3.1.1",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3/", "");
return 0;
})
.addNew<TestUnit>(
"node 3.1.1",
[](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3_1_1/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3_1_1/", "");
return 0;
},
nullptr,
PityUnit<>::ExecutionMode::PROCESS_PARALLEL)
.addNew<TestUnit>("node 3.1.1.1", [](TestUnit& pity, TestContext* ctx) {
PITYASSERT(pity.processDir() == "./pitytest_data/test_processdirs/node_3_1_1/", "");
PITYASSERT(pity.getProcessDir() == "./pitytest_data/test_processdirs/node_3_1_1/", "");
return 0;
});


Loading…
Cancel
Save