我是 Java 新手,正在尝试对我正在编写的类运行单元测试。Eclipse (3.5) 为我创建了单元测试类并将 Junit4 添加到我的类路径中。
我的课:
public class DistanceUtil
{
public static double metersToMiles( double meters )
{
return 0;
}
public static double metersToKilometers( double meters )
{
return 0;
}
}
我的单元测试:
public class DistanceUtilTest {
@Test
public final void testMetersToMiles() {
fail("Not yet implemented"); // TODO
}
@Test
public final void testMetersToKilometers() {
fail("Not yet implemented"); // TODO
}
}
当我右键单击单元测试并选择作为 Junit Test 运行时,我得到以下信息:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (classFileParser.cpp:3075), pid=5564, tid=4940
# Error: ShouldNotReachHere()
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode windows-x86 )
# An error report file with more information is saved as:
# C:\Users\Giles Roadnight\workspaceAndroid\Cycloid\hs_err_pid5564.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
#
有人知道我该如何解决这个问题吗?
谢谢