This commit is contained in:
Michael Bebenita 2015-05-15 13:44:17 -07:00
Родитель fcaa0d1dfa
Коммит 3814e7545e
2 изменённых файлов: 28 добавлений и 0 удалений

Просмотреть файл

@ -256,6 +256,7 @@ public class ShellTestlets {
// "test/org/jikesrvm/basic/core/bytecode/TestResolveOnInstanceof", // "test/org/jikesrvm/basic/core/bytecode/TestResolveOnInstanceof",
// "test/org/jikesrvm/basic/core/bytecode/TestResolveOnInvokeInterface", // "test/org/jikesrvm/basic/core/bytecode/TestResolveOnInvokeInterface",
// "test/org/jikesrvm/basic/core/classloading/TestUTF8", // "test/org/jikesrvm/basic/core/classloading/TestUTF8",
"gnu/testlet/vm/DoubleTest",
null}; null};
static { static {

Просмотреть файл

@ -0,0 +1,27 @@
package gnu.testlet.vm;
import gnu.testlet.*;
public class DoubleTest implements Testlet {
public int getExpectedPass() { return 9; }
public int getExpectedFail() { return 0; }
public int getExpectedKnownFail() { return 0; }
static double h = 123.456;
static double a = 5;
static double b = 7;
static double c = 50;
static double d = 5;
public void test(TestHarness th) {
th.check(("" + h), "123.456");
th.check(a + b, 12D);
th.check(a - b, -2D);
th.check(a * b, 35D);
th.check(c / a, 10D);
th.check(c % b, 1D);
th.check(a < b);
th.check(b > a);
th.check(a == d);
}
}