summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 17:45:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 17:45:31 +0100
commit66da4f83c1b5bb6f3ceda880820e01c2f8e23e43 (patch)
treea28addf0ca4533f2b0f7562e218bba6843432957 /test
parentLoad all assets in red dir with asset factory (diff)
downloadilt-66da4f83c1b5bb6f3ceda880820e01c2f8e23e43.tar.bz2
ilt-66da4f83c1b5bb6f3ceda880820e01c2f8e23e43.tar.xz
ilt-66da4f83c1b5bb6f3ceda880820e01c2f8e23e43.zip
Remove the old .obj load, assets and supporting stuff
Diffstat (limited to 'test')
-rw-r--r--test/Jamfile.jam1
-rw-r--r--test/test-obj.cpp39
2 files changed, 0 insertions, 40 deletions
diff --git a/test/Jamfile.jam b/test/Jamfile.jam
index d91af1d..b0eed5e 100644
--- a/test/Jamfile.jam
+++ b/test/Jamfile.jam
@@ -44,7 +44,6 @@ project : requirements
lib test : [ glob *.cpp : test-*.cpp perf-*.cpp ] ;
run test-collection.cpp ;
-run test-obj.cpp ;
run test-maths.cpp ;
run test-lib.cpp ;
run test-geo.cpp ;
diff --git a/test/test-obj.cpp b/test/test-obj.cpp
deleted file mode 100644
index e6e725d..0000000
--- a/test/test-obj.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#define BOOST_TEST_MODULE test_obj
-
-#include <boost/test/unit_test.hpp>
-
-#include <gfx/models/obj.h>
-#include <gfx/models/vertex.hpp>
-#include <glm/glm.hpp>
-#include <map>
-#include <memory>
-#include <utility>
-#include <vector>
-
-BOOST_AUTO_TEST_CASE(objparse)
-{
- const ObjParser op {RESDIR "/brush47.obj"};
- BOOST_CHECK_EQUAL(75, op.vertices.size());
- BOOST_CHECK_EQUAL(112, op.texCoords.size());
- BOOST_CHECK_EQUAL(31, op.normals.size());
- BOOST_CHECK_EQUAL(3, op.objects.size());
- const auto & object {op.objects.front()};
- BOOST_CHECK_EQUAL("Body", object.first);
- BOOST_CHECK_EQUAL(21, object.second.size());
- BOOST_CHECK_EQUAL(8, object.second[0].size());
- BOOST_CHECK_EQUAL(8, object.second[1].size());
- BOOST_CHECK_EQUAL(4, object.second[12].size());
-}
-
-BOOST_AUTO_TEST_CASE(create_meshes)
-{
- const ObjParser op {RESDIR "/brush47.obj"};
- const auto ms = op.createMeshData();
- BOOST_REQUIRE_EQUAL(3, ms.size());
- BOOST_REQUIRE_EQUAL("Body", ms.begin()->first);
- const auto & o = ms.at("Body");
- BOOST_REQUIRE_EQUAL(88, o.first.size());
- const auto & v = o.first.front();
- BOOST_REQUIRE_CLOSE(-1.345, v.pos.x, 1);
- BOOST_REQUIRE_EQUAL(138, o.second.size());
-}