parent
cee43f0de1
commit
659b0e8189
2 changed files with 34 additions and 10 deletions
|
|
@ -39,6 +39,16 @@ class ShapeTestCase(FHDLTestCase):
|
|||
msg="Width must be a non-negative integer, not -1"):
|
||||
Shape(-1)
|
||||
|
||||
def test_compare_wrong(self):
|
||||
with self.assertRaises(TypeError,
|
||||
msg="Shapes may be compared with other Shapes and (int, bool) tuples, not 'hi'"):
|
||||
Shape(1, True) == 'hi'
|
||||
|
||||
def test_compare_tuple_wrong(self):
|
||||
with self.assertRaises(TypeError,
|
||||
msg="Shapes may be compared with other Shapes and (int, bool) tuples, not (2, 3)"):
|
||||
Shape(1, True) == (2, 3)
|
||||
|
||||
def test_repr(self):
|
||||
self.assertEqual(repr(Shape()), "unsigned(1)")
|
||||
self.assertEqual(repr(Shape(2, True)), "signed(2)")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue