Skip to content
This repository has been archived by the owner on Oct 5, 2024. It is now read-only.

Commit

Permalink
Restore test, return 1 in failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Dec 15, 2023
1 parent 32fef60 commit 202de16
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/testsuite/libunderpass.all/val-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -301,25 +301,23 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
// status->dump();
// std::cerr << way->tags["note"] << std::endl;

// Good geometry rectangle
// if (way->id == -101790) {
// if (!status->hasStatus(badgeom)) {
// runtest.pass("Validate::checkWay(good geometry rectangle) [geometry building]");
// } else {
// runtest.fail("Validate::checkWay(good geometry rectangle) [geometry building]");
// }
// }

// Temporary: testing test results for CI
runtest.fail("Validate::checkWay(good geometry rectangle) [geometry building]");
return 1;
Good geometry rectangle
if (way->id == -101790) {
if (!status->hasStatus(badgeom)) {
runtest.pass("Validate::checkWay(good geometry rectangle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(good geometry rectangle) [geometry building]");
return 1;
}
}

// Good geometry complex rectangle
if (way->id == 838311812) {
if (!status->hasStatus(badgeom)) {
runtest.pass("Validate::checkWay(good geometry complex rectangle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(good geometry complex rectangle) [geometry building]");
return 1;
}
}

Expand All @@ -329,6 +327,7 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::checkWay(bad geometry triangle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(bad geometry triangle) [geometry building]");
return 1;
}
}

Expand All @@ -338,6 +337,7 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::checkWay(good geometry) [geometry building]");
} else {
runtest.fail("Validate::checkWay(good geometry) [geometry building]");
return 1;
}
}

Expand All @@ -356,6 +356,7 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::checkWay(good geometry big circle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(good geometry big circle) [geometry building]");
return 1;
}
}

Expand All @@ -365,6 +366,7 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::checkWay(good geometry really big circle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(good geometry really big circle) [geometry building]");
return 1;
}
}

Expand All @@ -374,6 +376,7 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::checkWay(good geometry circle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(good geometry small circle) [geometry building]");
return 1;
}
}

Expand All @@ -383,6 +386,7 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::checkWay(badgeom really bad circle) [geometry building]");
} else {
runtest.fail("Validate::checkWay(badgeom really bad circle) [geometry building]");
return 1;
}
}
}
Expand Down Expand Up @@ -447,11 +451,13 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::validateWays(overlapping) [geometry building]");
} else {
runtest.fail("Validate::validateWays(overlapping) [geometry building]");
return 1;
}
if (status.hasStatus(duplicate)) {
runtest.pass("Validate::validateWays(duplicate) [geometry building]");
} else {
runtest.fail("Validate::validateWays(duplicate) [geometry building]");
return 1;
}
}

Expand All @@ -478,11 +484,13 @@ test_geospatial(std::shared_ptr<Validate> &plugin)
runtest.pass("Validate::validateWays(no overlapping) [geometry building]");
} else {
runtest.fail("Validate::validateWays(no overlapping) [geometry building]");
return 1;
}
if (!status.hasStatus(duplicate)) {
runtest.pass("Validate::validateWays(no duplicate) [geometry building]");
} else {
runtest.fail("Validate::validateWays(no duplicate) [geometry building]");
return 1;
}
}
}
Expand Down

0 comments on commit 202de16

Please sign in to comment.