diff options
| author | Richard Lin | 2019-03-25 23:49:14 -0700 |
|---|---|---|
| committer | GitHub | 2019-03-25 23:49:14 -0700 |
| commit | 50bbf973b4d631e14bd3cf40fa9dfe39a5c3d2e4 (patch) | |
| tree | d08b04849dbbb31fdf8b9a80983ae0ee87265f25 /src/test/scala/chiselTests/NamingAnnotationTest.scala | |
| parent | 1f8a5862c9b1642757af9f2dc0a34532c0a342a6 (diff) | |
Allow naming annotation to work outside builder context (#1051)
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) + } } |
