Details
Description
Creating an empty Interface in folder test/unit results in the below error :
| Error Compilation error compiling [unit] tests: startup failed:
/tmp/jira/jira/test/unit/MyInterface.groovy: Error processing interface 'MyInterface'. @TestFor not allowed for interfaces.
1 error
You can reproduce it with the attached project.
This error comes from the @TestFor AST-Transformation that is applied on each type, called from GrailsTestCompiler. And this AST-Transformation is forbidden on Interface.
-
Hide
- jira.zip
- 23/Nov/11 6:15 AM
- 117 kB
- boillod manuel
-
- jira/.../org.codehaus.groovy.eclipse.preferences.prefs 0.1 kB
- jira/.classpath 0.7 kB
- jira/web-app/WEB-INF/tld/grails.tld 18 kB
- jira/web-app/WEB-INF/tld/spring.tld 7 kB
- jira/web-app/WEB-INF/tld/fmt.tld 19 kB
- jira/web-app/WEB-INF/tld/c.tld 16 kB
- jira/web-app/.../applicationContext.xml 1 kB
- jira/web-app/WEB-INF/sitemesh.xml 0.6 kB
- jira/web-app/css/mobile.css 1 kB
- jira/web-app/css/errors.css 2 kB
- jira/web-app/css/main.css 11 kB
- jira/web-app/.../skin/database_table.png 0.7 kB
- jira/web-app/.../skin/database_add.png 0.6 kB
- jira/web-app/images/skin/information.png 0.8 kB
- jira/web-app/.../skin/database_edit.png 0.7 kB
- jira/web-app/images/skin/sorted_desc.gif 0.8 kB
- jira/web-app/images/skin/exclamation.png 0.7 kB
- jira/web-app/.../skin/database_delete.png 0.6 kB
- jira/web-app/images/skin/house.png 0.8 kB
- jira/web-app/.../skin/database_save.png 0.7 kB
- jira/web-app/images/skin/sorted_asc.gif 0.8 kB
- jira/web-app/images/skin/shadow.jpg 0.3 kB
- jira/web-app/.../leftnav_midstretch.png 3 kB
- jira/web-app/images/grails_logo.jpg 8 kB
- jira/web-app/images/leftnav_btm.png 4 kB
- jira/web-app/.../apple-touch-icon-retina.png 15 kB
- jira/web-app/images/apple-touch-icon.png 5 kB
- jira/web-app/images/leftnav_top.png 3 kB
- jira/web-app/images/favicon.ico 10 kB
- jira/web-app/images/spinner.gif 2 kB
Activity
- All
- Comments
- Work Log
- History
- Activity
- Git Commits
It would be intersting to add folders test/src/java and test/src/groovy to every files that are not tests files.
Today, I put thoses files in src/java folder but I have to add test dependencies to scope 'compile' instead of 'test'
The two problems are linked.
Regards