Mercurial > hg > truffle
comparison graal/com.oracle.graal.jtt/src/com/oracle/graal/jtt/lang/Math_log10.java @ 7282:390448a6b535
converted the JTT tests to use the GraalCompilerTest framework which offers more control over what is compiled and executed
the HP_series and FloatingReads tests have been disabled temporarily
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 20 Dec 2012 14:59:57 +0100 |
parents | e808627bd16f |
children | 0320e6278f84 |
comparison
equal
deleted
inserted
replaced
7281:e960cda050d7 | 7282:390448a6b535 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 */ | 22 */ |
23 package com.oracle.graal.jtt.lang; | 23 package com.oracle.graal.jtt.lang; |
24 | 24 |
25 import com.oracle.graal.jtt.*; | |
25 import org.junit.*; | 26 import org.junit.*; |
26 | 27 |
27 /* | 28 /* |
28 */ | 29 */ |
29 public class Math_log10 { | 30 public class Math_log10 extends JTTTest { |
30 | 31 |
31 @SuppressWarnings("serial") | 32 @SuppressWarnings("serial") |
32 public static class NaN extends Throwable { | 33 public static class NaN extends Throwable { |
33 } | 34 } |
34 | 35 |
41 return v; | 42 return v; |
42 } | 43 } |
43 | 44 |
44 @Test | 45 @Test |
45 public void run0() throws Throwable { | 46 public void run0() throws Throwable { |
46 Assert.assertEquals(0.0d, test(1.0d), 0); | 47 runTestWithDelta(0, "test", 1.0d); |
47 } | 48 } |
48 | 49 |
49 @Test | 50 @Test |
50 public void run1() throws Throwable { | 51 public void run1() throws Throwable { |
51 Assert.assertEquals(1.0d, test(10.0d), 0); | 52 runTestWithDelta(0, "test", 10.0d); |
52 } | 53 } |
53 | 54 |
54 @Test | 55 @Test |
55 public void run2() throws Throwable { | 56 public void run2() throws Throwable { |
56 Assert.assertEquals(2.0d, test(100.0d), 0); | 57 runTestWithDelta(0, "test", 100.0d); |
57 } | 58 } |
58 | 59 |
59 @Test(expected = com.oracle.graal.jtt.lang.Math_log10.NaN.class) | 60 @Test |
60 public void run3() throws Throwable { | 61 public void run3() throws Throwable { |
61 test(java.lang.Double.NaN); | 62 runTest("test", java.lang.Double.NaN); |
62 } | 63 } |
63 | 64 |
64 @Test(expected = com.oracle.graal.jtt.lang.Math_log10.NaN.class) | 65 @Test |
65 public void run4() throws Throwable { | 66 public void run4() throws Throwable { |
66 test(-1.0d); | 67 runTest("test", -1.0d); |
67 } | 68 } |
68 | 69 |
69 @Test(expected = com.oracle.graal.jtt.lang.Math_log10.NaN.class) | 70 @Test |
70 public void run5() throws Throwable { | 71 public void run5() throws Throwable { |
71 test(java.lang.Double.NEGATIVE_INFINITY); | 72 runTest("test", java.lang.Double.NEGATIVE_INFINITY); |
72 } | 73 } |
73 | 74 |
74 @Test | 75 @Test |
75 public void run6() throws Throwable { | 76 public void run6() throws Throwable { |
76 Assert.assertEquals(java.lang.Double.POSITIVE_INFINITY, test(java.lang.Double.POSITIVE_INFINITY), 0); | 77 runTestWithDelta(0, "test", java.lang.Double.POSITIVE_INFINITY); |
77 } | 78 } |
78 | 79 |
79 @Test | 80 @Test |
80 public void run7() throws Throwable { | 81 public void run7() throws Throwable { |
81 Assert.assertEquals(java.lang.Double.NEGATIVE_INFINITY, test(0.0d), 0); | 82 runTestWithDelta(0, "test", 0.0d); |
82 } | 83 } |
83 | 84 |
84 @Test | 85 @Test |
85 public void run8() throws Throwable { | 86 public void run8() throws Throwable { |
86 Assert.assertEquals(java.lang.Double.NEGATIVE_INFINITY, test(-0.0d), 0); | 87 runTestWithDelta(0, "test", -0.0d); |
87 } | 88 } |
88 | 89 |
89 } | 90 } |