parent
656db317d2
commit
a6e33abc5f
2 changed files with 12 additions and 2 deletions
|
|
@ -321,6 +321,10 @@ class ValueTestCase(FHDLTestCase):
|
|||
"(cat (slice (const 9'd256) 1:9) (slice (const 9'd256) 0:1))")
|
||||
self.assertRepr(Const(256).rotate_left(-7),
|
||||
"(cat (slice (const 9'd256) 7:9) (slice (const 9'd256) 0:7))")
|
||||
self.assertRepr(Const(0, 0).rotate_left(3),
|
||||
"(cat (slice (const 0'd0) 0:0) (slice (const 0'd0) 0:0))")
|
||||
self.assertRepr(Const(0, 0).rotate_left(-3),
|
||||
"(cat (slice (const 0'd0) 0:0) (slice (const 0'd0) 0:0))")
|
||||
|
||||
def test_rotate_left_wrong(self):
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
|
|
@ -336,6 +340,10 @@ class ValueTestCase(FHDLTestCase):
|
|||
"(cat (slice (const 9'd256) 8:9) (slice (const 9'd256) 0:8))")
|
||||
self.assertRepr(Const(256).rotate_right(-7),
|
||||
"(cat (slice (const 9'd256) 2:9) (slice (const 9'd256) 0:2))")
|
||||
self.assertRepr(Const(0, 0).rotate_right(3),
|
||||
"(cat (slice (const 0'd0) 0:0) (slice (const 0'd0) 0:0))")
|
||||
self.assertRepr(Const(0, 0).rotate_right(-3),
|
||||
"(cat (slice (const 0'd0) 0:0) (slice (const 0'd0) 0:0))")
|
||||
|
||||
def test_rotate_right_wrong(self):
|
||||
with self.assertRaisesRegex(TypeError,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue