aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/scala/firrtlTests/ParserSpec.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ParserSpec.scala b/src/test/scala/firrtlTests/ParserSpec.scala
index a1f14c8e..cd9bfb40 100644
--- a/src/test/scala/firrtlTests/ParserSpec.scala
+++ b/src/test/scala/firrtlTests/ParserSpec.scala
@@ -93,6 +93,19 @@ class ParserSpec extends FirrtlFlatSpec {
}
}
+ // ********** Digits as Fields **********
+ "Digits" should "be legal fields in bundles and in subexpressions" in {
+ val input = """
+ |circuit Test :
+ | module Test :
+ | input in : { 0 : { 0 : UInt<32>, flip 1 : UInt<32> } }
+ | input in2 : { 4 : { 23 : { foo : UInt<32>, bar : { flip 123 : UInt<32> } } } }
+ | in.0.1 <= in.0.0
+ | in2.4.23.bar.123 <= in2.4.23.foo
+ """.stripMargin
+ firrtl.Parser.parse(input split "\n")
+ }
+
// ********** Doubles as parameters **********
"Doubles" should "be legal parameters for extmodules" in {
val nums = Seq("1.0", "7.6", "3.00004", "1.0E10", "1.0023E-17")