summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/geoData/deform/multi1.json21
-rw-r--r--test/test-geoData.cpp12
2 files changed, 33 insertions, 0 deletions
diff --git a/test/fixtures/geoData/deform/multi1.json b/test/fixtures/geoData/deform/multi1.json
new file mode 100644
index 0000000..c7456b6
--- /dev/null
+++ b/test/fixtures/geoData/deform/multi1.json
@@ -0,0 +1,21 @@
+[
+ [
+ [
+ [
+ 100,
+ 100,
+ 100
+ ],
+ [
+ 150,
+ 100,
+ 100
+ ],
+ [
+ 100,
+ 150,
+ 100
+ ]
+ ]
+ ]
+]
diff --git a/test/test-geoData.cpp b/test/test-geoData.cpp
index 35d6bae..b0261db 100644
--- a/test/test-geoData.cpp
+++ b/test/test-geoData.cpp
@@ -276,3 +276,15 @@ BOOST_DATA_TEST_CASE(deform, loadFixtureJson<DeformTerrainData>("geoData/deform/
Texture::save(tro.outImage, cam.second.c_str());
});
}
+
+BOOST_DATA_TEST_CASE(
+ deformMulti, loadFixtureJson<std::vector<std::vector<GlobalPosition3D>>>("geoData/deform/multi1.json"), points)
+{
+ BOOST_REQUIRE(!points.empty());
+ Surface surface;
+ auto gd = std::make_shared<GeoData>(GeoData::createFlat({0, 0}, {1000000, 1000000}, 100));
+ for (const auto & strip : points) {
+ BOOST_REQUIRE_GE(strip.size(), 3);
+ BOOST_CHECK_NO_THROW(gd->setHeights(strip, surface));
+ }
+}