Skip to content

Commit

Permalink
Convert Assert to 2D
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Nov 4, 2022
1 parent 39bbe48 commit 797111f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions include/geos/util/Assert.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// Forward declarations
namespace geos {
namespace geom {
class Coordinate;
class CoordinateXY;
}
}

Expand All @@ -40,13 +40,13 @@ class GEOS_DLL Assert {
}


static void equals(const geom::Coordinate& expectedValue,
const geom::Coordinate& actualValue,
static void equals(const geom::CoordinateXY& expectedValue,
const geom::CoordinateXY& actualValue,
const std::string& message);

static void
equals(const geom::Coordinate& expectedValue,
const geom::Coordinate& actualValue)
equals(const geom::CoordinateXY& expectedValue,
const geom::CoordinateXY& actualValue)
{
equals(expectedValue, actualValue, std::string());
}
Expand Down
4 changes: 2 additions & 2 deletions src/util/Assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Assert::isTrue(bool assertion, const std::string& message)
}

void
Assert::equals(const Coordinate& expectedValue,
const Coordinate& actualValue, const std::string& message)
Assert::equals(const CoordinateXY& expectedValue,
const CoordinateXY& actualValue, const std::string& message)
{
if(!(actualValue == expectedValue)) {
throw AssertionFailedException("Expected " + expectedValue.toString() + " but encountered "
Expand Down

0 comments on commit 797111f

Please sign in to comment.