diff options
Diffstat (limited to 'src/test/scala/chiselTests/NamingAnnotationTest.scala')
| -rw-r--r-- | src/test/scala/chiselTests/NamingAnnotationTest.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/scala/chiselTests/NamingAnnotationTest.scala b/src/test/scala/chiselTests/NamingAnnotationTest.scala index 9fdf0695..aae9123e 100644 --- a/src/test/scala/chiselTests/NamingAnnotationTest.scala +++ b/src/test/scala/chiselTests/NamingAnnotationTest.scala @@ -154,6 +154,11 @@ object NonNamedHelper { val myVal = NamedFunction() myVal } + + @chiselName + def NonBuilderFunction(): Int = { // scalastyle:ignore method.name + 1 + 1 + } } @chiselName @@ -215,4 +220,8 @@ class NamingAnnotationSpec extends ChiselPropSpec { property("NonNamedFunction should elaborate") { elaborate { new NonNamedFunction } } + + property("NonBuilderFunction should run outside a Builder context") { + NonNamedHelper.NonBuilderFunction() should be (2) + } } |
