diff options
| author | Jack Koenig | 2017-05-03 15:49:57 -0700 |
|---|---|---|
| committer | Adam Izraelevitz | 2017-05-03 15:49:57 -0700 |
| commit | 61a82d2e4518ec97b852c4555ad4c7c0fe05140a (patch) | |
| tree | 4477d4b549fa349fb6a9d36432a00e87c499e9d1 /src | |
| parent | 2e936ce6e0ac79d4aa4034e7c51f659cb00fc3dd (diff) | |
Add test for source locators on multi-line reset registers (#554)
Test for #468
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/scala/firrtlTests/ParserSpec.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/scala/firrtlTests/ParserSpec.scala b/src/test/scala/firrtlTests/ParserSpec.scala index cd9bfb40..b030be8e 100644 --- a/src/test/scala/firrtlTests/ParserSpec.scala +++ b/src/test/scala/firrtlTests/ParserSpec.scala @@ -27,6 +27,7 @@ class ParserSpec extends FirrtlFlatSpec { val prelude = Seq("circuit top :", " module top :") val reg = " reg r : UInt<32>, clock" val reset = "reset => (radReset, UInt(\"hdeadbeef\"))" + val finfo = "@[Reg.scala:33:10]" } private object KeywordTests { @@ -77,6 +78,16 @@ class ParserSpec extends FirrtlFlatSpec { firrtl.Parser.parse((prelude :+ s"${reg} with :\n (${reset})")) } + it should "allow source locators with same-line reset" in { + import RegTests._ + firrtl.Parser.parse((prelude :+ s"${reg} with : (${reset}) $finfo" :+ " wire a : UInt")) + } + + it should "allow source locators with multi-line reset" in { + import RegTests._ + firrtl.Parser.parse((prelude :+ s"${reg} with :\n (${reset}) $finfo")) + } + // ********** Keywords ********** "Keywords" should "be allowed as Ids" in { import KeywordTests._ |
