From 202de1652fd56ef2005b4c4796b63731999ed6d3 Mon Sep 17 00:00:00 2001 From: Emillio Mariscal Date: Fri, 15 Dec 2023 07:43:15 -0300 Subject: [PATCH] Restore test, return 1 in failed tests --- src/testsuite/libunderpass.all/val-test.cc | 32 ++++++++++++++-------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/testsuite/libunderpass.all/val-test.cc b/src/testsuite/libunderpass.all/val-test.cc index 82f4040f..b967dc98 100644 --- a/src/testsuite/libunderpass.all/val-test.cc +++ b/src/testsuite/libunderpass.all/val-test.cc @@ -301,18 +301,15 @@ test_geospatial(std::shared_ptr &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) { @@ -320,6 +317,7 @@ test_geospatial(std::shared_ptr &plugin) runtest.pass("Validate::checkWay(good geometry complex rectangle) [geometry building]"); } else { runtest.fail("Validate::checkWay(good geometry complex rectangle) [geometry building]"); + return 1; } } @@ -329,6 +327,7 @@ test_geospatial(std::shared_ptr &plugin) runtest.pass("Validate::checkWay(bad geometry triangle) [geometry building]"); } else { runtest.fail("Validate::checkWay(bad geometry triangle) [geometry building]"); + return 1; } } @@ -338,6 +337,7 @@ test_geospatial(std::shared_ptr &plugin) runtest.pass("Validate::checkWay(good geometry) [geometry building]"); } else { runtest.fail("Validate::checkWay(good geometry) [geometry building]"); + return 1; } } @@ -356,6 +356,7 @@ test_geospatial(std::shared_ptr &plugin) runtest.pass("Validate::checkWay(good geometry big circle) [geometry building]"); } else { runtest.fail("Validate::checkWay(good geometry big circle) [geometry building]"); + return 1; } } @@ -365,6 +366,7 @@ test_geospatial(std::shared_ptr &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; } } @@ -374,6 +376,7 @@ test_geospatial(std::shared_ptr &plugin) runtest.pass("Validate::checkWay(good geometry circle) [geometry building]"); } else { runtest.fail("Validate::checkWay(good geometry small circle) [geometry building]"); + return 1; } } @@ -383,6 +386,7 @@ test_geospatial(std::shared_ptr &plugin) runtest.pass("Validate::checkWay(badgeom really bad circle) [geometry building]"); } else { runtest.fail("Validate::checkWay(badgeom really bad circle) [geometry building]"); + return 1; } } } @@ -447,11 +451,13 @@ test_geospatial(std::shared_ptr &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; } } @@ -478,11 +484,13 @@ test_geospatial(std::shared_ptr &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; } } }