Commit e810fb69 authored by Deepak Rangarajan's avatar Deepak Rangarajan
Browse files

update test

parent ccc2ede9
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
#include "catch2/catch.hpp"

#include <csg.hpp>
#include <csg_exception.hpp>
#include <csg_types.hpp>

// Tests for the primitives on their own
@@ -69,7 +70,7 @@ $name="my_polyhedron");

TEST_CASE("bad vs good polyhedron openscad example", "[csg]") {
  // https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#polyhedron
  CHECK_THROWS(csg::parse_csg(R"(
  CHECK_THROWS_AS(csg::parse_csg(R"(
polyhedron(
points = [[0, -10, 60], [0, 10, 60], [0, 10, 0], 
[0, -10, 0], [60, -10, 60], [60, 10, 60], [10, -10, 50], 
@@ -83,7 +84,8 @@ faces = [[0, 2, 3], [0, 1, 2], [0, 4, 5], [0, 5, 1],
[1, 11, 5], [1, 7, 8], [1, 8, 2], [2, 8, 11], [2, 11, 5]], 

convexity = 1);
)"));
)"),
                  csg::Exception);

  auto st = *csg::parse_csg(R"(
polyhedron(