update tests
This commit is contained in:
@@ -9,7 +9,7 @@ public class TestEnum extends AbstractTest {
|
||||
|
||||
public enum Direction {
|
||||
NORTH, SOUTH, EAST, WEST
|
||||
};
|
||||
}
|
||||
|
||||
private static int three = 3;
|
||||
|
||||
@@ -25,7 +25,7 @@ public class TestEnum extends AbstractTest {
|
||||
public int getNum() {
|
||||
return num;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public enum Operation {
|
||||
PLUS {
|
||||
@@ -101,11 +101,28 @@ public class TestEnum extends AbstractTest {
|
||||
|
||||
public enum Singleton {
|
||||
INSTANCE;
|
||||
|
||||
public String test(String arg) {
|
||||
return arg.concat("test");
|
||||
}
|
||||
}
|
||||
|
||||
public String testEnumSwitch(final Direction color) {
|
||||
String d;
|
||||
switch (color) {
|
||||
case NORTH:
|
||||
d = "N";
|
||||
break;
|
||||
case SOUTH:
|
||||
d = "S";
|
||||
break;
|
||||
default:
|
||||
d = "<>";
|
||||
break;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean testRun() throws Exception {
|
||||
Direction d = Direction.EAST;
|
||||
|
||||
@@ -37,15 +37,6 @@ public class TestInvoke extends AbstractTest {
|
||||
return s;
|
||||
}
|
||||
|
||||
/* TODO
|
||||
public TestInvoke testConstructor(int flag) {
|
||||
if (getF() == flag)
|
||||
return new TestInvoke(flag);
|
||||
else
|
||||
return this;
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public boolean testRun() throws Exception {
|
||||
TestInvoke inv = new TestInvoke();
|
||||
@@ -58,7 +49,6 @@ public class TestInvoke extends AbstractTest {
|
||||
assertTrue(inv.testVarArgs("a", "2", "III"));
|
||||
assertTrue(inv.testVarArgs2("a".toCharArray(), new char[] { '1', '2' }).equals("a12"));
|
||||
|
||||
// assertTrue(testConstructor(f) != this);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user