summaryrefslogtreecommitdiff
path: root/tests/cgalstlsanitytest.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-07-15 01:57:55 (GMT)
committerMarius Kintel <marius@kintel.net>2012-07-15 01:57:55 (GMT)
commit13557f1f9a44caccb0546717065ed72c27a210b3 (patch)
treed0ed7bd176d7c0b052431cb99efd358602d6b6bb /tests/cgalstlsanitytest.cc
parent38a4585d1a9abe9c779c5d0677bfc81c407db371 (diff)
parent2495df6bab07f14f0eed7062dec17d24599aa838 (diff)
Merge branch 'timestamp-cache'
Diffstat (limited to 'tests/cgalstlsanitytest.cc')
-rw-r--r--tests/cgalstlsanitytest.cc24
1 files changed, 17 insertions, 7 deletions
diff --git a/tests/cgalstlsanitytest.cc b/tests/cgalstlsanitytest.cc
index 92b4ac1..137f626 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