📄 unittest.java
字号:
//: com:bruceeckel:test:UnitTest.java
// The basic unit testing class
package com.bruceeckel.test;
import java.util.*;
public class UnitTest {
static String testID;
static List errors = new ArrayList();
// Override cleanup() if test object
// creation allocates non-memory
// resources that must be cleaned up:
protected void cleanup() {}
// Verify the truth of a condition:
protected final void affirm(boolean condition){
if(!condition)
errors.add("failed: " + testID);
}
} ///:~
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -