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 <string>
00021
00022
00023 namespace geos {
00024 namespace geom {
00025 class Coordinate;
00026 }
00027 }
00028
00029 namespace geos {
00030 namespace util {
00031
00032 class Assert {
00033 public:
00034
00035 static void isTrue(bool assertion, const std::string& message);
00036
00037 static void isTrue(bool assertion) {
00038 isTrue(assertion, std::string());
00039 }
00040
00041
00042 static void equals(const geom::Coordinate& expectedValue,
00043 const geom::Coordinate& actualValue,
00044 const std::string& message);
00045
00046 static void equals(const geom::Coordinate& expectedValue,
00047 const geom::Coordinate& actualValue)
00048 {
00049 equals(expectedValue, actualValue, std::string());
00050 }
00051
00052
00053 static void shouldNeverReachHere(const std::string& message);
00054
00055 static void shouldNeverReachHere() { shouldNeverReachHere(std::string()); }
00056 };
00057
00058 }
00059 }
00060
00061
00062 #endif // GEOS_UTIL_ASSERT_H
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072