summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cgalstlsanitytest.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc
index d0d0077..7241482 100644
--- a/tests/cgalstlsanitytest.cc
+++ b/tests/cgalstlsanitytest.cc
@@ -132,17 +132,27 @@ int main(int argc, char **argv)
if (!N.empty()) {
std::ofstream outfile;
outfile.open(outfilename);
-
- std::stringstream out;
- export_stl(&N, out);
- if (out.str().find("nan") != string::npos) {
- outfile << "Error: nan found\n";
+
+ if (N.dim != 3) {
+ outfile << "Error: Current top level object is not a 3D object.\n";
retval = 2;
}
- if (out.str().find("inf") != string::npos) {
- outfile << "Error: inf found\n";
+ else if (!N.p3->is_simple()) {
+ outfile << "Error: Object isn't a valid 2-manifold! Modify your design.\n";
retval = 2;
}
+ else {
+ std::stringstream out;
+ export_stl(&N, out);
+ if (out.str().find("nan") != string::npos) {
+ outfile << "Error: nan found\n";
+ retval = 2;
+ }
+ if (out.str().find("inf") != string::npos) {
+ outfile << "Error: inf found\n";
+ retval = 2;
+ }
+ }
outfile.close();
}
contact: Jan Huwald // Impressum