Skip to content

Commit ad7df23

Browse files
committed
add sphere tests, and broken circle tests.
1 parent f5b8aa0 commit ad7df23

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Graphics/Implicit/ExtOpenScad/Primitives.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ sphere :: (Symbol, SourcePosition -> ArgParser (StateC [OVal]))
140140
sphere = moduleWithoutSuite "sphere" $ \_ -> do
141141
example "sphere(3);"
142142
example "sphere(r=5);"
143+
test "sphere(3);" `eulerCharacteristic` 2
144+
test "sphere(r=1.5);" `eulerCharacteristic` 2
143145
-- arguments:
144146
-- The radius, r, which is a (real) number.
145147
-- Because we don't provide a default, this ends right
@@ -468,12 +470,10 @@ circle :: (Symbol, SourcePosition -> ArgParser (StateC [OVal]))
468470
circle = moduleWithoutSuite "circle" $ \_ -> do
469471
example "circle(r=10); // circle"
470472
example "circle(r=5, $fn=6); //hexagon"
471-
-- FIXME: support 2D tests.
473+
-- FIXME: and somehow, these are broken.
472474
{-
473-
test "circle(r=10);"
474-
`eulerCharacteristic` 0
475-
test "circle(d=20);"
476-
`eulerCharacteristic` 0
475+
contoursAreClosed $ test "circle(r=10);"
476+
contoursAreClosed $ test "circle(d=20);"
477477
-}
478478
-- Arguments
479479
r <-

0 commit comments

Comments
 (0)