diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/OffscreenContext.mm | 26 | ||||
-rw-r--r-- | tests/csgtestcore.cc | 2 | ||||
-rw-r--r-- | tests/regression/cgalpngtest/hull2-tests-expected.png | bin | 7531 -> 7121 bytes | |||
-rw-r--r-- | tests/regression/dumptest/hull2-tests-expected.txt | 24 | ||||
-rw-r--r-- | tests/regression/opencsgtest/hull2-tests-expected.png | bin | 8078 -> 7924 bytes | |||
-rw-r--r-- | tests/regression/throwntogethertest/hull2-tests-expected.png | bin | 4151 -> 7924 bytes |
7 files changed, 47 insertions, 8 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index bb05ce7..585c3b1 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -275,8 +275,7 @@ set(CGAL_SOURCES ../src/CGALCache.cc ../src/PolySetCGALEvaluator.cc ../src/CGAL_Nef_polyhedron_DxfData.cc - ../src/cgaladv_minkowski2.cc - ../src/cgaladv_convexhull2.cc) + ../src/cgaladv_minkowski2.cc) set(COMMON_SOURCES ../src/nodedumper.cc diff --git a/tests/OffscreenContext.mm b/tests/OffscreenContext.mm index eb06615..ea46275 100644 --- a/tests/OffscreenContext.mm +++ b/tests/OffscreenContext.mm @@ -2,9 +2,11 @@ #include "imageutils.h" #include "fbo.h" #include <iostream> +#include <sstream> #import <AppKit/AppKit.h> // for NSOpenGL... - +#include <CoreServices/CoreServices.h> +#include <sys/utsname.h> #define REPORTGLERROR(task) { GLenum tGLErr = glGetError(); if (tGLErr != GL_NO_ERROR) { std::cout << "OpenGL error " << tGLErr << " while " << task << "\n"; } } @@ -17,13 +19,27 @@ struct OffscreenContext fbo_t *fbo; }; -string offscreen_context_getinfo(OffscreenContext *ctx) +std::string offscreen_context_getinfo(OffscreenContext *ctx) { - stringstream out; + std::stringstream out; + + struct utsname name; + uname(&name); + + SInt32 majorVersion,minorVersion,bugFixVersion; + + Gestalt(gestaltSystemVersionMajor, &majorVersion); + Gestalt(gestaltSystemVersionMinor, &minorVersion); + Gestalt(gestaltSystemVersionBugFix, &bugFixVersion); + + char *arch = "unknown"; + if (sizeof(int*) == 4) arch = "32-bit"; + else if (sizeof(int*) == 8) arch = "64-bit"; + out << "GL context creator: Cocoa / CGL\n" << "PNG generator: Core Foundation\n" - << "OS info: Mac OSX\n" - << "Machine: Apple(TM) Mac(TM)\n"; + << "OS info: Mac OS X " << majorVersion << "." << minorVersion << "." << bugFixVersion << " (" << name.machine << " kernel)\n" + << "Machine: " << arch << "\n"; return out.str(); } diff --git a/tests/csgtestcore.cc b/tests/csgtestcore.cc index 4cdc5d8..3ea0e36 100644 --- a/tests/csgtestcore.cc +++ b/tests/csgtestcore.cc @@ -327,7 +327,7 @@ int csgtestcore(int argc, char *argv[], test_type_e test_type) csgInfo.root_chain = new CSGChain(); csgInfo.root_chain->import(csgInfo.root_norm_term); - fprintf(stderr, "Normalized CSG tree has %d elements\n", csgInfo.root_chain->polysets.size()); + fprintf(stderr, "Normalized CSG tree has %d elements\n", int(csgInfo.root_chain->polysets.size())); if (csgInfo.highlight_terms.size() > 0) { cerr << "Compiling highlights (" << csgInfo.highlight_terms.size() << " CSG Trees)...\n"; diff --git a/tests/regression/cgalpngtest/hull2-tests-expected.png b/tests/regression/cgalpngtest/hull2-tests-expected.png Binary files differindex 256b349..508974f 100644 --- a/tests/regression/cgalpngtest/hull2-tests-expected.png +++ b/tests/regression/cgalpngtest/hull2-tests-expected.png diff --git a/tests/regression/dumptest/hull2-tests-expected.txt b/tests/regression/dumptest/hull2-tests-expected.txt index 87365a6..d060d1d 100644 --- a/tests/regression/dumptest/hull2-tests-expected.txt +++ b/tests/regression/dumptest/hull2-tests-expected.txt @@ -32,4 +32,28 @@ } } } + multmatrix([[1, 0, 0, 30], [0, 1, 0, -25], [0, 0, 1, 0], [0, 0, 0, 1]]) { + group() { + hull() { + group() { + group() { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 0, $fa = 12, $fs = 1, r = 3); + } + multmatrix([[1, 0, 0, 0], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 0, $fa = 12, $fs = 1, r = 3); + } + } + group() { + multmatrix([[1, 0, 0, 10], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 0, $fa = 12, $fs = 1, r = 3); + } + multmatrix([[1, 0, 0, 10], [0, 1, 0, 10], [0, 0, 1, 0], [0, 0, 0, 1]]) { + circle($fn = 0, $fa = 12, $fs = 1, r = 3); + } + } + } + } + } + } diff --git a/tests/regression/opencsgtest/hull2-tests-expected.png b/tests/regression/opencsgtest/hull2-tests-expected.png Binary files differindex 66ee6b2..46b266b 100644 --- a/tests/regression/opencsgtest/hull2-tests-expected.png +++ b/tests/regression/opencsgtest/hull2-tests-expected.png diff --git a/tests/regression/throwntogethertest/hull2-tests-expected.png b/tests/regression/throwntogethertest/hull2-tests-expected.png Binary files differindex 221cbaf..46b266b 100644 --- a/tests/regression/throwntogethertest/hull2-tests-expected.png +++ b/tests/regression/throwntogethertest/hull2-tests-expected.png |