summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-01-17 14:58:54 (GMT)
committerMarius Kintel <marius@kintel.net>2013-01-17 14:58:54 (GMT)
commit0b1029ff4d6f17a9f397adbf3f0a011cc20d76a5 (patch)
treee59dc3c1f4068bb748ebedde54c935a5ab3ef9ca /tests
parent8dfc6d71cae370a84e50f4cc7624c05c859a4cea (diff)
parent20280e88cacc8935de139cd2ce46836beda87e0b (diff)
Merge branch 'master' of github.com:openscad/openscad
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt1
-rw-r--r--tests/cgalpngtest.cc16
-rw-r--r--tests/cgalstlsanitytest.cc2
-rw-r--r--tests/cgaltest.cc2
-rw-r--r--tests/regression/cgalpngtest/control-hull-dimension-expected.pngbin0 -> 6301 bytes
-rw-r--r--tests/regression/dumptest/control-hull-dimension-expected.txt5
-rw-r--r--tests/regression/opencsgtest/control-hull-dimension-expected.pngbin0 -> 6868 bytes
-rw-r--r--tests/regression/throwntogethertest/control-hull-dimension-expected.pngbin0 -> 6868 bytes
-rwxr-xr-xtests/test_pretty_print.py6
9 files changed, 18 insertions, 14 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 18f4469..87e5319 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -773,7 +773,6 @@ set_test_config(Heavy opencsgtest_minkowski3-tests
cgalpngtest_minkowski3-tests
cgalpngtest_for-tests
cgalpngtest_for-nested-tests
- cgalpngtest_difference-tests
cgalpngtest_intersection-tests)
foreach(FILE ${EXAMPLE_FILES})
diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc
index 08e539e..56861c6 100644
--- a/tests/cgalpngtest.cc
+++ b/tests/cgalpngtest.cc
@@ -153,30 +153,30 @@ int main(int argc, char **argv)
exit(1);
}
- CGALRenderer cgalRenderer(N);
-
+ CGALRenderer cgalRenderer(N);
+
BoundingBox bbox;
if (cgalRenderer.polyhedron) {
CGAL::Bbox_3 cgalbbox = cgalRenderer.polyhedron->bbox();
bbox = BoundingBox(Vector3d(cgalbbox.xmin(), cgalbbox.ymin(), cgalbbox.zmin()),
- Vector3d(cgalbbox.xmax(), cgalbbox.ymax(), cgalbbox.zmax()));
+ Vector3d(cgalbbox.xmax(), cgalbbox.ymax(), cgalbbox.zmax()));
}
else if (cgalRenderer.polyset) {
bbox = cgalRenderer.polyset->getBoundingBox();
}
-
+
Vector3d center = getBoundingCenter(bbox);
double radius = getBoundingRadius(bbox);
-
+
Vector3d cameradir(1, 1, -0.5);
Vector3d camerapos = center - radius*2*cameradir;
csgInfo.glview->setCamera(camerapos, center);
-
-
+
+
csgInfo.glview->setRenderer(&cgalRenderer);
csgInfo.glview->paintGL();
csgInfo.glview->save(outfile);
-
+
delete root_node;
delete root_module;
diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc
index 137f626..52cfb41 100644
--- a/tests/cgalstlsanitytest.cc
+++ b/tests/cgalstlsanitytest.cc
@@ -129,7 +129,7 @@ int main(int argc, char **argv)
CGAL_Nef_polyhedron N = cgalevaluator.evaluateCGALMesh(*root_node);
current_path(original_path);
- if (!N.empty()) {
+ if (!N.isNull()) {
std::ofstream outfile;
outfile.open(outfilename);
diff --git a/tests/cgaltest.cc b/tests/cgaltest.cc
index e4761db..b546286 100644
--- a/tests/cgaltest.cc
+++ b/tests/cgaltest.cc
@@ -122,7 +122,7 @@ int main(int argc, char **argv)
CGAL_Nef_polyhedron N = cgalevaluator.evaluateCGALMesh(*root_node);
current_path(original_path);
- if (!N.empty()) {
+ if (!N.isNull()) {
export_stl(&N, std::cout);
}
diff --git a/tests/regression/cgalpngtest/control-hull-dimension-expected.png b/tests/regression/cgalpngtest/control-hull-dimension-expected.png
new file mode 100644
index 0000000..ceeaf54
--- /dev/null
+++ b/tests/regression/cgalpngtest/control-hull-dimension-expected.png
Binary files differ
diff --git a/tests/regression/dumptest/control-hull-dimension-expected.txt b/tests/regression/dumptest/control-hull-dimension-expected.txt
new file mode 100644
index 0000000..be2e4ee
--- /dev/null
+++ b/tests/regression/dumptest/control-hull-dimension-expected.txt
@@ -0,0 +1,5 @@
+ hull() {
+ circle($fn = 0, $fa = 12, $fs = 2, r = 1);
+ group();
+ }
+
diff --git a/tests/regression/opencsgtest/control-hull-dimension-expected.png b/tests/regression/opencsgtest/control-hull-dimension-expected.png
new file mode 100644
index 0000000..52d11c1
--- /dev/null
+++ b/tests/regression/opencsgtest/control-hull-dimension-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/control-hull-dimension-expected.png b/tests/regression/throwntogethertest/control-hull-dimension-expected.png
new file mode 100644
index 0000000..52d11c1
--- /dev/null
+++ b/tests/regression/throwntogethertest/control-hull-dimension-expected.png
Binary files differ
diff --git a/tests/test_pretty_print.py b/tests/test_pretty_print.py
index 8c57f1c..a2a04ed 100755
--- a/tests/test_pretty_print.py
+++ b/tests/test_pretty_print.py
@@ -1,8 +1,8 @@
#!/usr/bin/python
-# test_pretty_print copyright 2012 don bright. released under the GPL 2, or
-# later, as described in the file named 'COPYING' in OpenSCAD's project root.
-# permission to change this license is given to Marius Kintel & Clifford Wolf
+# test_pretty_print by don bright 2012. Copyright assigned to Marius Kintel and
+# Clifford Wolf 2012. Released under the GPL 2, or later, as described in
+# the file named 'COPYING' in OpenSCAD's project root.
#
# This program 'pretty prints' the ctest output, namely
contact: Jan Huwald // Impressum