Problems running specs as JUnit4 ttests
Migrated from http://lampsvn.epfl.ch/trac/scala/ticket/3173
Reporter nejsum
In this project: http://github.com/jeppenejsum/spectest There are two JUnit4 test cases in the project:
If I manually add demo.test.SimpleUnitTest as a JUnit4 test and run it, it works.
Problem 2)
If I manually add net.liftweb.common.LoggingTest as a JUnit4 test and run it, I get an NPE:
Reporter nejsum
In this project: http://github.com/jeppenejsum/spectest There are two JUnit4 test cases in the project:
- demo.test.SimpleUnitTest # net.liftweb.common.LoggingTest Problem 1)
If I manually add demo.test.SimpleUnitTest as a JUnit4 test and run it, it works.
Problem 2)
If I manually add net.liftweb.common.LoggingTest as a JUnit4 test and run it, I get an NPE:
java.lang.NullPointerException
at scala.tools.eclipse.contribution.weaving.jdt.core.DOMAspect.fixTypes(DOMAspect.aj:148)
at scala.tools.eclipse.contribution.weaving.jdt.core.DOMAspect.ajc$privMethod$scala_tools_eclipse_contribution_weaving_jdt_core_DOMAspect$scala_tools_eclipse_contribution_weaving_jdt_core_DOMAspect$fixTypes(DOMAspect.aj:1)
at scala.tools.eclipse.contribution.weaving.jdt.core.DOMAspect.fixTypes(DOMAspect.aj:153)
at scala.tools.eclipse.contribution.weaving.jdt.core.DOMAspect.ajc$privMethod$scala_tools_eclipse_contribution_weaving_jdt_core_DOMAspect$scala_tools_eclipse_contribution_weaving_jdt_core_DOMAspect$fixTypes(DOMAspect.aj:1)
at scala.tools.eclipse.contribution.weaving.jdt.core.DOMAspect.ajc$around$scala_tools_eclipse_contribution_weaving_jdt_core_DOMAspect$1$3b9eae81(DOMAspect.aj:120)
at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:823)
at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:677)
at org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder.internalIsTest(JUnit4TestFinder.java:232)
at org.eclipse.jdt.internal.junit.launcher.JUnit4TestFinder.findTestsInContainer(JUnit4TestFinder.java:116)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.evaluateTests(JUnitLaunchConfigurationDelegate.java:264)
at org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate.launch(JUnitLaunchConfigurationDelegate.java:129)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
This is with Scala Eclipse Plugin 2.8.0.r21146-b20100312035748 ch.epfl.lamp.sdt.feature.group
eclipse.buildId=unknown
java.version=1.6.0_17
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product
Leave a comment
Updating tickets (#1000069, #1000195, #1000213, #1000223, #1000006, #1000021, #1000038, #1000048, #1000051, #1000052, #1000075, #1000103, #1000109, #1000115, #1000119, #1000156, #1000186, #1000207, #1000238, #1000262, #1000263, #380, #389, #683, #1238, #1331, #1635, #1645, #1715, #1729, #1744, #1783, #1839, #1869, #1885, #1890, #1902, #1918, #1919, #1924, #1925, #1946, #1964, #1991, #2131, #2233, #2342, #2348, #2408, #2459, #2499, #2523, #2572, #2582, #2602, #2614, #2615, #2675, #2710, #2745, #2763, #2816, #2830, #2834, #2878, #2879, #2887, #2888, #2901, #2911, #2912, #2922, #2937, #2938, #2942, #2951, #2955, #2957, #2961, #2964, #2965, #2974, #2975, #2989, #2990, #3002, #3055, #3070, #3087, #3135, #3139, #3173, #3182, #3184, #3200, #3213, #3214, #3221, #3243, #3251)
Closing as invalid.
I can get LoggingTest to work fine on 2.0.0-2.8 using the 'RunWith' style:
SimpleSpec doesn't seem to do much.
I can get LoggingTest to work fine on 2.0.0-2.8 using the 'RunWith' style:
...
// remove this line, the class is defined later
// class LoggingTest extends JUnit4(LoggingUnit)
...
// with RunWith and 'class' instead of 'object'
@RunWith(classOf[JUnitSuiteRunner])
class LoggingUnit extends Specification with JUnit {
...
SimpleSpec doesn't seem to do much.