Skip to content

Commit

Permalink
Add failing test for libgeos#858
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Aug 25, 2019
1 parent 7834f32 commit c487768
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/unit/operation/IsSimpleOpTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
#include <geos/geom/GeometryFactory.h>
#include <geos/geom/PrecisionModel.h>
#include <geos/io/WKTReader.h>
#include <geos/io/WKBReader.h>
// std
#include <string>
#include <sstream>
#include <memory>

using namespace geos::geom;
Expand Down Expand Up @@ -102,4 +104,35 @@ void object::test<3>
ensure(true == simple);
}


template<>
template<>
void object::test<4>
()
{
// Adapted from https://trac.osgeo.org/geos/ticket/858
constexpr char kData[] =
"00000000020000000e0000000000000000"
"0000000000000000240424242424242424"
"24242424280000000000ffffffffffff3b"
"ffffffffffffffffffffffff4000010800"
"0000030000003b01980000000000000000"
"0000000000000000000000000000002900"
"000000000100000000490001f34e537437"
"6c6f63616c653500000000000000000000"
"2800000000000000000000000000000000"
"fb0000000000010700000000003a000000"
"f100000000000000000000f60000000000"
"0000000000000000000000000000000000"
"0000000000000000200000000000000000"
"0000000000000000000000000000000000";

geos::io::WKBReader reader;
std::istringstream s(kData);

auto g = reader.readHEX(s);

g->isSimple();
}

} // namespace tut

0 comments on commit c487768

Please sign in to comment.