test_cases.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 import unittest
3 import tuw_geometry as tuw
4 
5 class TestPoint2D(unittest.TestCase):
6 
7  def runTest(self):
8  p = tuw.Point2D(3,2)
9  self.assertEqual(p.x, 3, 'incorrect x')
10  self.assertEqual(p.y, 2, 'incorrect y')
11  self.assertEqual(p.h, 1, 'incorrect h')
12  p = tuw.Point2D(3,2,3)
13  self.assertEqual(p.x, 3, 'incorrect x')
14  self.assertEqual(p.y, 2, 'incorrect y')
15  self.assertEqual(p.h, 3, 'incorrect h')
16 
17 class TestPose2D(unittest.TestCase):
18 
19  def runTest(self):
20  pose = tuw.Pose2D(3,2,0)
21  p0 = tuw.Point2D(0,0)
22 
23  self.assertEqual(pose.x, 3, 'incorrect x')
24  self.assertEqual(pose.y, 2, 'incorrect y')
25  # self.assertEqual(pose.h, 1, 'incorrect h')
26 
27  # do some things to my_var which might change its value...
28 
29  # self.assertTrue(my_var)
30 
31 if __name__ == '__main__':
32  unittest.main()


tuw_geometry
Author(s): Markus Bader
autogenerated on Mon Jun 10 2019 15:33:09