Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Guilhem Saurel
hpp-fcl
Commits
6338e5d6
Commit
6338e5d6
authored
Nov 15, 2019
by
Gabriele Buondonno
Browse files
[test] [python] Improve geometric_shapes.py
parent
94146680
Changes
1
Hide whitespace changes
Inline
Side-by-side
test/python_unit/geometric_shapes.py
View file @
6338e5d6
...
...
@@ -37,12 +37,6 @@ class TestGeometricShapes(unittest.TestCase):
self
.
assertEqual
(
box
.
halfSide
[
0
],
0.5
)
self
.
assertEqual
(
box
.
halfSide
[
1
],
1.0
)
self
.
assertEqual
(
box
.
halfSide
[
2
],
1.5
)
box
.
halfSide
[
0
]
=
4.
box
.
halfSide
[
0
]
=
5.
box
.
halfSide
[
0
]
=
6.
# self.assertEqual(box.halfSide[0],4.)
# self.assertEqual(box.halfSide[1],5.)
# self.assertEqual(box.halfSide[2],6.)
def
test_sphere
(
self
):
sphere
=
hppfcl
.
Sphere
(
1.
)
...
...
@@ -62,6 +56,10 @@ class TestGeometricShapes(unittest.TestCase):
self
.
assertEqual
(
cylinder
.
getNodeType
(),
hppfcl
.
NODE_TYPE
.
GEOM_CYLINDER
)
self
.
assertEqual
(
cylinder
.
radius
,
1.
)
self
.
assertEqual
(
cylinder
.
halfLength
,
1.
)
cylinder
.
radius
=
3.
cylinder
.
halfLength
=
4.
self
.
assertEqual
(
cylinder
.
radius
,
3.
)
self
.
assertEqual
(
cylinder
.
halfLength
,
4.
)
def
test_cone
(
self
):
cone
=
hppfcl
.
Cone
(
1.
,
2.
)
...
...
@@ -77,4 +75,4 @@ class TestGeometricShapes(unittest.TestCase):
self
.
assertEqual
(
cone
.
halfLength
,
4.
)
if
__name__
==
'__main__'
:
unittest
.
main
()
\ No newline at end of file
unittest
.
main
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment