/src/geos/include/geos/util/Assert.h
Line | Count | Source |
1 | | /********************************************************************** |
2 | | * |
3 | | * GEOS - Geometry Engine Open Source |
4 | | * http://geos.osgeo.org |
5 | | * |
6 | | * Copyright (C) 2001-2002 Vivid Solutions Inc. |
7 | | * Copyright (C) 2006 Refractions Research Inc. |
8 | | * |
9 | | * This is free software; you can redistribute and/or modify it under |
10 | | * the terms of the GNU Lesser General Public Licence as published |
11 | | * by the Free Software Foundation. |
12 | | * See the COPYING file for more information. |
13 | | * |
14 | | **********************************************************************/ |
15 | | |
16 | | #pragma once |
17 | | |
18 | | #include <geos/export.h> |
19 | | #include <string> |
20 | | |
21 | | // Forward declarations |
22 | | namespace geos { |
23 | | namespace geom { |
24 | | class CoordinateXY; |
25 | | } |
26 | | } |
27 | | |
28 | | namespace geos { |
29 | | namespace util { // geos.util |
30 | | |
31 | | class GEOS_DLL Assert { |
32 | | public: |
33 | | |
34 | | static void isTrue(bool assertion, const std::string& message); |
35 | | |
36 | | static void |
37 | | isTrue(bool assertion) |
38 | 3.13M | { |
39 | 3.13M | isTrue(assertion, std::string()); |
40 | 3.13M | } |
41 | | |
42 | | |
43 | | static void equals(const geom::CoordinateXY& expectedValue, |
44 | | const geom::CoordinateXY& actualValue, |
45 | | const std::string& message); |
46 | | |
47 | | static void |
48 | | equals(const geom::CoordinateXY& expectedValue, |
49 | | const geom::CoordinateXY& actualValue) |
50 | 0 | { |
51 | 0 | equals(expectedValue, actualValue, std::string()); |
52 | 0 | } |
53 | | |
54 | | |
55 | | static void shouldNeverReachHere(const std::string& message); |
56 | | |
57 | | static void |
58 | | shouldNeverReachHere() |
59 | 9 | { |
60 | 9 | shouldNeverReachHere(std::string()); |
61 | 9 | } |
62 | | }; |
63 | | |
64 | | } // namespace geos.util |
65 | | } // namespace geos |
66 | | |