summaryrefslogtreecommitdiff
path: root/test/test-render.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2025-05-12 04:03:25 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2025-05-12 04:03:25 +0100
commit58ee1221d47fbcd3b86ad85f26f6eb65579999fa (patch)
tree112665ad2ef7ad9d7946c52074c11fdff3d993fc /test/test-render.cpp
parentAdd network helpers for easily adding a chain of links (diff)
downloadilt-58ee1221d47fbcd3b86ad85f26f6eb65579999fa.tar.bz2
ilt-58ee1221d47fbcd3b86ad85f26f6eb65579999fa.tar.xz
ilt-58ee1221d47fbcd3b86ad85f26f6eb65579999fa.zip
Update test link creation code to use new interface(s)
Diffstat (limited to 'test/test-render.cpp')
-rw-r--r--test/test-render.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/test/test-render.cpp b/test/test-render.cpp
index 90fa894..6869a7d 100644
--- a/test/test-render.cpp
+++ b/test/test-render.cpp
@@ -69,8 +69,13 @@ namespace {
.rot = {0, rotationDistribution(randomdev), 0}});
}
}
- rail.addLinksBetween({42000, 50000, 1000}, {65000, 50000, 1000});
- rail.addLinksBetween({65000, 50000, 1000}, {75000, 45000, 2000});
+ rail.add(nullptr,
+ rail.createChain(nullptr,
+ std::array<GlobalPosition3D, 3> {{
+ {42000, 50000, 1000},
+ {65000, 50000, 1000},
+ {75000, 45000, 2000},
+ }}));
}
void
@@ -218,11 +223,15 @@ BOOST_AUTO_TEST_CASE(RailNetwork)
public:
TestRail()
{
- net.addLinksBetween({20000, 10000, 0}, {100000, 100000, 0});
- net.addLinksBetween({20000, 10000, 0}, {10000, 10000, 0});
- net.addLinksBetween({10000, 20000, 0}, {100000, 120000, 0});
- net.addLinksBetween({10000, 20000, 0}, {10000, 10000, 0});
- net.addLinksBetween({100000, 100000, 0}, {100000, 120000, 0});
+ net.add(nullptr,
+ net.createChain(nullptr,
+ std::array<GlobalPosition3D, 5> {{
+ {20000, 10000, 0},
+ {100000, 100000, 0},
+ {100000, 120000, 0},
+ {40000, 40000, 0},
+ {10000, 20000, 0},
+ }}));
}
void