JUnit for Java 1.4 [英] JUnit for Java 1.4

查看:145
本文介绍了JUnit for Java 1.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个版本的JUnit适用于Java 1.4?看看JUnit 3和4文档,我无法弄明白。

Which version of JUnit works for Java 1.4? Looking at the JUnit 3 and 4 docs, I can't figure it out.

谢谢!

推荐答案

JUnit 4与JUnit 3向后兼容。显然,你必须将自己局限于JUnit 3 API,因为jdk1.4的注释是不可能的。更大的问题是JUnit 4类将使用jdk1.5编译,java 1.4编译器可能不喜欢它。既然你无法从新的功能中受益,你应该坚持使用JUnit 3.

JUnit 4 is backward-compatible with JUnit 3. You would have to confine yourself to the JUnit 3 API, obviously, since annotations are out of the question for jdk1.4. The bigger problem is that JUnit 4 classes would be compiled with jdk1.5, which the java 1.4 compiler would probably not like. Since you can't benefit from the newer functionality anyway you should probably stick with JUnit 3.

这篇关于JUnit for Java 1.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆