Skip to content

Commit 5b7462d

Browse files
committed
more test cases
1 parent 3eae7a0 commit 5b7462d

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

sources/net.sf.j2s.java.core/src/test/Test_Boolean.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ class Test_Boolean extends Test_ {
55
public static int i_;
66

77
public static void main(String[] args) {
8+
9+
assert(new Boolean(false).equals(Boolean.FALSE));
10+
811
System.out.println("" + (new Boolean("true")) + (!new Boolean("false")));
912
assert(new Boolean("true"));
1013
assert(!new Boolean("false"));

sources/net.sf.j2s.java.core/src/test/Test_Class.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
class Test_Class extends Test_ {
1212

1313
private void test(String s) {
14-
14+
1515
}
1616

1717
void c() {
@@ -27,8 +27,13 @@ private void test(Integer i) {
2727
static String s = "test";
2828

2929
static {
30-
System.out.println(java.lang.Number.class.getSuperclass());
31-
System.out.println(java.lang.Object.class.getSuperclass());
30+
assert (java.lang.Number.class.getSuperclass() == Object.class);
31+
assert (java.lang.Object.class.getSuperclass() == null);
32+
assert (Integer.TYPE.isPrimitive());
33+
assert (!Integer.TYPE.isArray());
34+
assert (Integer.class.getName().equals("java.lang.Integer"));
35+
System.out.println("static java.lang OK");
36+
3237
}
3338
private String test = "testing";
3439

@@ -63,8 +68,6 @@ public void propertyChange(PropertyChangeEvent event) {
6368
};
6469

6570

66-
System.out.println(true);
67-
6871
final Test_Class me = Test_Class.this;
6972
MouseListener c = new MouseListener() {
7073

@@ -109,7 +112,7 @@ public void mouseExited(MouseEvent e) {
109112

110113
Hashtable<String, Object> t = new Hashtable<String, Object>() {
111114
public Object put(String key, Object value) {
112-
super.put(key, value);
115+
super.put(key, value);
113116
System.out.println("t.put:" + key + "/" + value);
114117
// test for inner class access to an outer class's superclass method
115118
assert(showt() == 0);
@@ -206,10 +209,6 @@ public static void main(String[] args) {
206209
}
207210

208211

209-
System.out.println(Integer.TYPE.isPrimitive());
210-
System.out.println(Integer.TYPE.isArray());
211-
212-
213212
class LocalClass {
214213

215214
String hello() {

sources/net.sf.j2s.java.core/src/test/Test_Editor_AWT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public void actionPerformed(ActionEvent e) {
200200

201201
@Override
202202
public void actionPerformed(ActionEvent e) {
203-
System.out.println("Test_Editor action " + getID(e.getSource()));
203+
System.out.println("Test_Editor action 1 " + e.getSource() + " " + getID(e.getSource()));
204204
area.append("\ntesting" + ++n);
205205
// area.requestFocus();
206206
}

0 commit comments

Comments
 (0)