Skip to content

Commit a4919c2

Browse files
authored
Render tests (#4)
1 parent cbb49a9 commit a4919c2

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

test/Test/Yosys/Rtl.hs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,19 @@ tests dataDir =
4848
]
4949
, let five :: SigSpec
5050
five = SigSpecConstant $ ConstantValue $ Value 3 [B1, B0, B1]
51+
sigSpecA :: SigSpec
52+
sigSpecA = SigSpecWireId "\\a"
5153
in testGroup "SigSpec"
52-
[ prettyUnitTest "Pretty Five" five "3'101"
53-
, fromStringTest "String Five" "3'101" five
54+
[ fromStringTest "String Five" "3'101" five
55+
, testGroup "Pretty"
56+
[ prettyUnitTest "Five" five "3'101"
57+
, prettyUnitTest "WireId" (SigSpecWireId "\\wireId") "\\wireId"
58+
, prettyUnitTest "Slice" (SigSpecSlice sigSpecA 3 Nothing) "\\a [3]"
59+
, prettyUnitTest "Slice range" (SigSpecSlice sigSpecA 0 (Just 2)) "\\a [0:2]"
60+
, prettyUnitTest "Slice ranges"
61+
(SigSpecSlice (SigSpecSlice sigSpecA 7 (Just 0)) 2 Nothing)
62+
"\\a [7:0] [2]"
63+
]
5464
]
5565
]
5666
, testGroup "synth"

0 commit comments

Comments
 (0)