Skip to content

Commit

Permalink
Update src/python_pybind11/test/Cone_TEST.py
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Peters <[email protected]>
Signed-off-by: Benjamin Perseghetti <[email protected]>
  • Loading branch information
bperseghetti and scpeters committed May 16, 2024
1 parent d025776 commit cbd801b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/python_pybind11/test/Cone_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import unittest

import gz
from gz.math7 import Coned, MassMatrix3d, Material, Quaterniond
from gz.math8 import Coned, MassMatrix3d, Material, Quaterniond


class TestCone(unittest.TestCase):
Expand Down Expand Up @@ -56,14 +56,14 @@ def test_constructor(self):
self.assertEqual(cone, cone2)

# Length, radius, mat and rot constructor
cone = Coned(1.0, 2.0, Material(gz.math7.MaterialType.WOOD),
cone = Coned(1.0, 2.0, Material(gz.math8.MaterialType.WOOD),
Quaterniond(0.1, 0.2, 0.3))
self.assertEqual(1.0, cone.length())
self.assertEqual(2.0, cone.radius())
self.assertEqual(Quaterniond(0.1, 0.2, 0.3), cone.rotational_offset())
self.assertEqual(Material(gz.math7.MaterialType.WOOD), cone.mat())
self.assertEqual(Material(gz.math8.MaterialType.WOOD), cone.mat())

cone2 = Coned(1.0, 2.0, Material(gz.math7.MaterialType.WOOD),
cone2 = Coned(1.0, 2.0, Material(gz.math8.MaterialType.WOOD),
Quaterniond(0.1, 0.2, 0.3))
self.assertEqual(cone, cone2)

Expand All @@ -77,12 +77,12 @@ def test_mutators(self):
cone.set_length(100.1)
cone.set_radius(.123)
cone.set_rotational_offset(Quaterniond(1.2, 2.3, 3.4))
cone.set_mat(Material(gz.math7.MaterialType.PINE))
cone.set_mat(Material(gz.math8.MaterialType.PINE))

self.assertEqual(100.1, cone.length())
self.assertEqual(.123, cone.radius())
self.assertEqual(Quaterniond(1.2, 2.3, 3.4), cone.rotational_offset())
self.assertEqual(Material(gz.math7.MaterialType.PINE), cone.mat())
self.assertEqual(Material(gz.math8.MaterialType.PINE), cone.mat())

def test_volume_and_density(self):
mass = 1.0
Expand Down

0 comments on commit cbd801b

Please sign in to comment.