diff options
author | Marius Kintel <marius@kintel.net> | 2012-07-07 20:02:51 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-07-07 20:02:51 (GMT) |
commit | 0d619e5ac155e37c432d57062d8224a58c9d59ab (patch) | |
tree | 10183df17cd4786ee1ef43b95c988fefd13ca990 /tests | |
parent | aa8aee623adc74cbfe87f9e92e30be4a9ed3a7c8 (diff) | |
parent | b028b704e029a5161d3703efda35642a37c28cb6 (diff) |
Merge branch 'master' into linear_extrude_argument
Diffstat (limited to 'tests')
19 files changed, 28 insertions, 18 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 12b8543..5ec8be7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -237,7 +237,7 @@ if (NOT GLEW_INCLUDE_DIR) NO_DEFAULT_PATH) find_library(GLEW_LIBRARY NAMES GLEW glew - HINTS ${GLEW_DIR}/lib + HINTS ${GLEW_DIR}/lib ${GLEW_DIR}/lib64 NO_DEFAULT_PATH) if (NOT GLEW_LIBRARY) find_package(GLEW REQUIRED) @@ -611,10 +611,14 @@ endforeach() set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "${CMAKE_SOURCE_DIR}/EnforceConfig.cmake") # Subst files -configure_file(${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests-template.scad +configure_file(${CMAKE_SOURCE_DIR}/../testdata/scad/templates/include-tests-template.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad) -configure_file(${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests-template.scad +configure_file(${CMAKE_SOURCE_DIR}/../testdata/scad/templates/use-tests-template.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad) +configure_file(${CMAKE_SOURCE_DIR}/../testdata/scad/templates/import_stl-tests-template.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/features/import_stl-tests.scad) +configure_file(${CMAKE_SOURCE_DIR}/../testdata/scad/templates/import_dxf-tests-template.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/features/import_dxf-tests.scad) # Find all scad files file(GLOB MINIMAL_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/*.scad) diff --git a/tests/cgalcachetest.cc b/tests/cgalcachetest.cc index 18e9efa..46e0e9a 100644 --- a/tests/cgalcachetest.cc +++ b/tests/cgalcachetest.cc @@ -139,7 +139,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc index 7c9684a..08e539e 100644 --- a/tests/cgalpngtest.cc +++ b/tests/cgalpngtest.cc @@ -112,7 +112,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc index d0d0077..92b4ac1 100644 --- a/tests/cgalstlsanitytest.cc +++ b/tests/cgalstlsanitytest.cc @@ -98,7 +98,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/cgaltest.cc b/tests/cgaltest.cc index 98617a3..e4761db 100644 --- a/tests/cgaltest.cc +++ b/tests/cgaltest.cc @@ -91,7 +91,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/csgtermtest.cc b/tests/csgtermtest.cc index 1bd2468..e793c4a 100644 --- a/tests/csgtermtest.cc +++ b/tests/csgtermtest.cc @@ -77,7 +77,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index cb96940..acc7c31 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -258,7 +258,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) std::string currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); @@ -302,8 +302,8 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) } // CSG normalization - CSGTermNormalizer normalizer; - csgInfo.root_norm_term = normalizer.normalize(root_raw_term, 5000); + CSGTermNormalizer normalizer(5000); + csgInfo.root_norm_term = normalizer.normalize(root_raw_term); if (csgInfo.root_norm_term) { csgInfo.root_chain = new CSGChain(); csgInfo.root_chain->import(csgInfo.root_norm_term); @@ -319,7 +319,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) csgInfo.highlights_chain = new CSGChain(); for (unsigned int i = 0; i < csgInfo.highlight_terms.size(); i++) { - csgInfo.highlight_terms[i] = normalizer.normalize(csgInfo.highlight_terms[i], 5000); + csgInfo.highlight_terms[i] = normalizer.normalize(csgInfo.highlight_terms[i]); csgInfo.highlights_chain->import(csgInfo.highlight_terms[i]); } } @@ -329,7 +329,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) csgInfo.background_chain = new CSGChain(); for (unsigned int i = 0; i < csgInfo.background_terms.size(); i++) { - csgInfo.background_terms[i] = normalizer.normalize(csgInfo.background_terms[i], 5000); + csgInfo.background_terms[i] = normalizer.normalize(csgInfo.background_terms[i]); csgInfo.background_chain->import(csgInfo.background_terms[i]); } } diff --git a/tests/csgtexttest.cc b/tests/csgtexttest.cc index 6e18f20..e050232 100644 --- a/tests/csgtexttest.cc +++ b/tests/csgtexttest.cc @@ -81,7 +81,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/dumptest.cc b/tests/dumptest.cc index f923a64..6851fb1 100644 --- a/tests/dumptest.cc +++ b/tests/dumptest.cc @@ -84,10 +84,10 @@ int main(int argc, char **argv) QCoreApplication app(argc, argv); fs::path original_path = fs::current_path(); - currentdir = boosty::stringy( fs::current_path() ); + currentdir = boosty::stringy(fs::current_path()); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/echotest.cc b/tests/echotest.cc index d731ee3..bf2f4a4 100644 --- a/tests/echotest.cc +++ b/tests/echotest.cc @@ -89,7 +89,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/modulecachetest.cc b/tests/modulecachetest.cc index 2ef7a6c..0028114 100644 --- a/tests/modulecachetest.cc +++ b/tests/modulecachetest.cc @@ -77,7 +77,7 @@ int main(int argc, char **argv) currentdir = boosty::stringy( fs::current_path() ); parser_init(QCoreApplication::instance()->applicationDirPath().toStdString()); - set_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); + add_librarydir(boosty::stringy(fs::path(QCoreApplication::instance()->applicationDirPath().toStdString()) / "../libraries")); Context root_ctx; register_builtin(root_ctx); diff --git a/tests/regression/cgalpngtest/import_dxf-tests-expected.png b/tests/regression/cgalpngtest/import_dxf-tests-expected.png Binary files differindex 7c8a63e..f885b09 100644 --- a/tests/regression/cgalpngtest/import_dxf-tests-expected.png +++ b/tests/regression/cgalpngtest/import_dxf-tests-expected.png diff --git a/tests/regression/cgalpngtest/import_stl-tests-expected.png b/tests/regression/cgalpngtest/import_stl-tests-expected.png Binary files differindex 08aa225..de7638a 100644 --- a/tests/regression/cgalpngtest/import_stl-tests-expected.png +++ b/tests/regression/cgalpngtest/import_stl-tests-expected.png diff --git a/tests/regression/dumptest/import_dxf-tests-expected.txt b/tests/regression/dumptest/import_dxf-tests-expected.txt index 977efcc..d98b3e2 100644 --- a/tests/regression/dumptest/import_dxf-tests-expected.txt +++ b/tests/regression/dumptest/import_dxf-tests-expected.txt @@ -21,4 +21,7 @@ multmatrix([[1, 0, 0, 0], [0, 1, 0, 200], [0, 0, 1, 0], [0, 0, 0, 1]]) { import(file = "../../dxf/multiple-layers.dxf", layer = "Layer with a pretty long name including \\ \"special\" /'\\\\ characters", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } + multmatrix([[1, 0, 0, 200], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + import(file = "../../dxf/polygons.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + } diff --git a/tests/regression/dumptest/import_stl-tests-expected.txt b/tests/regression/dumptest/import_stl-tests-expected.txt index 648a207..947f137 100644 --- a/tests/regression/dumptest/import_stl-tests-expected.txt +++ b/tests/regression/dumptest/import_stl-tests-expected.txt @@ -5,4 +5,7 @@ multmatrix([[1, 0, 0, 4], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { import(file = "import_bin.stl", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 2], [0, 0, 1, 0], [0, 0, 0, 1]]) { + import(file = "import.stl", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 2); + } diff --git a/tests/regression/opencsgtest/import_dxf-tests-expected.png b/tests/regression/opencsgtest/import_dxf-tests-expected.png Binary files differindex 6e568c7..010a222 100644 --- a/tests/regression/opencsgtest/import_dxf-tests-expected.png +++ b/tests/regression/opencsgtest/import_dxf-tests-expected.png diff --git a/tests/regression/opencsgtest/import_stl-tests-expected.png b/tests/regression/opencsgtest/import_stl-tests-expected.png Binary files differindex 19e233a..0bd9ab6 100644 --- a/tests/regression/opencsgtest/import_stl-tests-expected.png +++ b/tests/regression/opencsgtest/import_stl-tests-expected.png diff --git a/tests/regression/throwntogethertest/import_dxf-tests-expected.png b/tests/regression/throwntogethertest/import_dxf-tests-expected.png Binary files differindex e8173d9..f5ef9fc 100644 --- a/tests/regression/throwntogethertest/import_dxf-tests-expected.png +++ b/tests/regression/throwntogethertest/import_dxf-tests-expected.png diff --git a/tests/regression/throwntogethertest/import_stl-tests-expected.png b/tests/regression/throwntogethertest/import_stl-tests-expected.png Binary files differindex 19e233a..0bd9ab6 100644 --- a/tests/regression/throwntogethertest/import_stl-tests-expected.png +++ b/tests/regression/throwntogethertest/import_stl-tests-expected.png |