00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_UTIL_ASSERT_H
00018 #define GEOS_UTIL_ASSERT_H
00019
00020 #include <geos/export.h>
00021 #include <string>
00022
00023
00024 namespace geos {
00025 namespace geom {
00026 class Coordinate;
00027 }
00028 }
00029
00030 namespace geos {
00031 namespace util {
00032
00033 class GEOS_DLL Assert {
00034 public:
00035
00036 static void isTrue(bool assertion, const std::string& message);
00037
00038 static void isTrue(bool assertion) {
00039 isTrue(assertion, std::string());
00040 }
00041
00042
00043 static void equals(const geom::Coordinate& expectedValue,
00044 const geom::Coordinate& actualValue,
00045 const std::string& message);
00046
00047 static void equals(const geom::Coordinate& expectedValue,
00048 const geom::Coordinate& actualValue)
00049 {
00050 equals(expectedValue, actualValue, std::string());
00051 }
00052
00053
00054 static void shouldNeverReachHere(const std::string& message);
00055
00056 static void shouldNeverReachHere() { shouldNeverReachHere(std::string()); }
00057 };
00058
00059 }
00060 }
00061
00062
00063 #endif // GEOS_UTIL_ASSERT_H
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073