diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cgalstlsanitytest.cc | 24 | ||||
-rw-r--r-- | tests/regression/echotest/vector-values-expected.txt | 4 |
2 files changed, 19 insertions, 9 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(); } diff --git a/tests/regression/echotest/vector-values-expected.txt b/tests/regression/echotest/vector-values-expected.txt index 7654892..78053b9 100644 --- a/tests/regression/echotest/vector-values-expected.txt +++ b/tests/regression/echotest/vector-values-expected.txt @@ -1,8 +1,8 @@ ECHO: "Testing vector dot product: 14" ECHO: " Bounds check: undef" -ECHO: "Testing matrix * vector: [3, 2]" +ECHO: "Testing matrix * vector: [3, 2, 13]" ECHO: " Bounds check: undef" -ECHO: "Testing vector * matrix: [2, -1, 0]" +ECHO: "Testing vector * matrix: [9, 8]" ECHO: " Bounds check: undef" ECHO: "Testing id matrix * id matrix: [[1, 0], [0, 1]]" ECHO: "Testing asymmetric matrix * matrix: [[2, 1], [-1, 0]]" |