Begin port of Slic3r::Test methods as part of the test harness (not linked into main application)

This commit is contained in:
Joseph Lenox 2018-07-13 19:20:23 -05:00
parent 8255dc321b
commit f29768ff8e
3 changed files with 196 additions and 0 deletions

View File

@ -195,6 +195,7 @@ set(UI_TEST_SOURCES
)
set(SLIC3R_TEST_SOURCES
${TESTDIR}/test_harness.cpp
${TESTDIR}/test_data.cpp
${TESTDIR}/libslic3r/test_trianglemesh.cpp
${TESTDIR}/libslic3r/test_config.cpp
)

160
src/test/test_data.cpp Normal file

File diff suppressed because one or more lines are too long

35
src/test/test_data.hpp Normal file
View File

@ -0,0 +1,35 @@
#ifndef SLIC3R_TEST_DATA_HPP
#include "Point.hpp"
#include "TriangleMesh.hpp"
namespace Slic3r { namespace Test {
enum class TestMesh {
A,
L,
V,
_40x10,
bridge,
bridge_with_hole,
cube_with_concave_hole,
cube_with_hole,
gt2_teeth,
ipadstand,
overhang,
pyramid,
sloping_hole,
slopy_cube,
small_dorito,
step,
two_hollow_squares
};
/// Port of Slic3r::Test::Mesh
/// Basic cubes/boxes should call TriangleMesh::make_cube() directly and rescale it
TriangleMesh mesh(TestMesh m);
TriangleMesh mesh(TestMesh m, Pointf3 translate, Pointf3 scale = Pointf3(1.0, 1.0, 1.0));
} } // namespace Slic3r::Test
#endif // SLIC3R_TEST_DATA_HPP