@@ -115,7 +115,7 @@ def test_cast_range(self):
115115 self .assertEqual (s3 .width , 4 )
116116 self .assertEqual (s3 .signed , True )
117117 s4 = Shape .cast (range (0 , 1 ))
118- self .assertEqual (s4 .width , 1 )
118+ self .assertEqual (s4 .width , 0 )
119119 self .assertEqual (s4 .signed , False )
120120 s5 = Shape .cast (range (- 1 , 0 ))
121121 self .assertEqual (s5 .width , 1 )
@@ -129,6 +129,9 @@ def test_cast_range(self):
129129 s8 = Shape .cast (range (0 , 10 , 3 ))
130130 self .assertEqual (s8 .width , 4 )
131131 self .assertEqual (s8 .signed , False )
132+ s9 = Shape .cast (range (0 , 3 , 3 ))
133+ self .assertEqual (s9 .width , 0 )
134+ self .assertEqual (s9 .signed , False )
132135
133136 def test_cast_enum (self ):
134137 s1 = Shape .cast (UnsignedEnum )
@@ -1088,7 +1091,7 @@ def test_shape(self):
10881091 s10 = Signal (range (0 ))
10891092 self .assertEqual (s10 .shape (), unsigned (0 ))
10901093 s11 = Signal (range (1 ))
1091- self .assertEqual (s11 .shape (), unsigned (1 ))
1094+ self .assertEqual (s11 .shape (), unsigned (0 ))
10921095
10931096 def test_shape_wrong (self ):
10941097 with self .assertRaisesRegex (TypeError ,
0 commit comments