Eclipse下junit@Test出现Type mismatch: cannot convert from Test to Annotation错误

来源:互联网 发布:备份与恢复软件 编辑:程序博客网 时间:2024/05/17 04:44
我所使用的是junit4.10,通过add external jars将junit引入到Eclipse,然后@Test来执行一个简单的测试,出现如下错误

鼠标移动到出错的@Test处,有Type mismatch: cannot convert from Test to Annotation这样的提示,
仔细一观察才发现原来自己写的测试类名也叫Test,错误的根源也就在这

转自:http://blog.csdn.net/zerountao/article/details/27709655

0 0
原创粉丝点击