GEOS 3.14.0dev
Assert.h
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
22namespace geos {
23namespace geom {
24class CoordinateXY;
25}
26}
27
28namespace geos {
29namespace util { // geos.util
30
31class GEOS_DLL Assert {
32public:
33
34 static void isTrue(bool assertion, const std::string& message);
35
36 static void
37 isTrue(bool assertion)
38 {
39 isTrue(assertion, std::string());
40 }
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 {
51 equals(expectedValue, actualValue, std::string());
52 }
53
54
55 static void shouldNeverReachHere(const std::string& message);
56
57 static void
58 shouldNeverReachHere()
59 {
60 shouldNeverReachHere(std::string());
61 }
62};
63
64} // namespace geos.util
65} // namespace geos
66
Basic namespace for all GEOS functionalities.
Definition geos.h:39