corda/test/Misc.java

49 lines
816 B
Java
Raw Normal View History

2007-10-24 21:06:02 +00:00
public class Misc {
private static int alpha;
private static int beta;
2007-12-16 00:24:15 +00:00
private int gamma;
private String foo(String s) {
return s;
}
public String bar(String s) {
return s;
}
private static String baz(String s) {
return s;
}
2007-12-16 00:24:15 +00:00
private static void expect(boolean v) {
if (! v) throw new RuntimeException();
}
2007-11-05 14:28:46 +00:00
public static void main(String[] args) {
boolean v = Boolean.valueOf("true");
2007-12-16 00:24:15 +00:00
ClassLoader.getSystemClassLoader().toString();
int a = 2;
int b = 2;
int c = a + b;
2007-12-11 23:52:28 +00:00
Misc m = new Misc();
String s = "hello";
m.foo(s);
m.bar(s);
baz(s);
2007-12-11 21:26:59 +00:00
2007-12-16 00:24:15 +00:00
int d = alpha;
beta = 42;
alpha = 43;
int e = beta;
int f = alpha;
m.gamma = 44;
expect(beta == 42);
expect(alpha == 43);
expect(m.gamma == 44);
}
}