From a1de9d8bb5fc8df2b215d2050dc5212f4ac33d2d Mon Sep 17 00:00:00 2001 From: Patrick Brosi Date: Thu, 17 Oct 2024 15:31:24 +0200 Subject: [PATCH] fix tests --- tests/issues/Issue15.cpp | 4 ++-- tests/osm/OsmiumHandler.cpp | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/issues/Issue15.cpp b/tests/issues/Issue15.cpp index ac2445ea..99c28a0e 100644 --- a/tests/issues/Issue15.cpp +++ b/tests/issues/Issue15.cpp @@ -65,7 +65,7 @@ TEST(Issue15, Relation_8291361_expected) { ASSERT_THAT(printedState, ::testing::HasSubstr("relations seen:1 dumped: 1 geometry: 0\n")); ASSERT_THAT(printedState, - ::testing::HasSubstr("ways seen:47 dumped: 1 geometry: 0\n")); + ::testing::HasSubstr("ways seen:47 dumped: 47 geometry: 0\n")); const auto printedData = coutBuffer.str(); ASSERT_THAT( printedData, @@ -115,7 +115,7 @@ TEST(Issue15, Relation_8291361_failed) { ASSERT_THAT(printedState, ::testing::HasSubstr("relations seen:1 dumped: 1 geometry: 0\n")); ASSERT_THAT(printedState, - ::testing::HasSubstr("ways seen:47 dumped: 1 geometry: 0\n")); + ::testing::HasSubstr("ways seen:47 dumped: 47 geometry: 0\n")); const auto printedData = coutBuffer.str(); ASSERT_THAT( printedData, diff --git a/tests/osm/OsmiumHandler.cpp b/tests/osm/OsmiumHandler.cpp index ef15269e..c8b20add 100644 --- a/tests/osm/OsmiumHandler.cpp +++ b/tests/osm/OsmiumHandler.cpp @@ -183,7 +183,7 @@ TEST(OSM_OsmiumHandler, noFacts) { ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); ASSERT_EQ(0, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -221,7 +221,7 @@ TEST(OSM_OsmiumHandler, noGeometricRelations) { ASSERT_EQ(2, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); + ASSERT_EQ(2, oh.waysDumped()); ASSERT_EQ(0, oh.wayGeometriesHandled()); // Cleanup @@ -260,8 +260,8 @@ TEST(OSM_OsmiumHandler, noAreaFacts) { ASSERT_EQ(2, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.waysDumped()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -299,8 +299,8 @@ TEST(OSM_OsmiumHandler, noNodeFacts) { ASSERT_EQ(2, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.waysDumped()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -338,8 +338,8 @@ TEST(OSM_OsmiumHandler, noRelationFacts) { ASSERT_EQ(0, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.waysDumped()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -378,7 +378,7 @@ TEST(OSM_OsmiumHandler, noWayFacts) { ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); ASSERT_EQ(0, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -416,8 +416,8 @@ TEST(OSM_OsmiumHandler, noAreaGeometricRelations) { ASSERT_EQ(2, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.waysDumped()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -455,8 +455,8 @@ TEST(OSM_OsmiumHandler, noNodeGeometricRelations) { ASSERT_EQ(2, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); - ASSERT_EQ(1, oh.wayGeometriesHandled()); + ASSERT_EQ(2, oh.waysDumped()); + ASSERT_EQ(2, oh.wayGeometriesHandled()); // Cleanup output.close(); @@ -494,7 +494,7 @@ TEST(OSM_OsmiumHandler, noWayGeometricRelations) { ASSERT_EQ(2, oh.relationsDumped()); ASSERT_EQ(0, oh.relationGeometriesHandled()); ASSERT_EQ(2, oh.waysSeen()); - ASSERT_EQ(1, oh.waysDumped()); + ASSERT_EQ(2, oh.waysDumped()); ASSERT_EQ(0, oh.wayGeometriesHandled()); // Cleanup