diff options
author | Jorg Pleumann <> | 2009-04-29 12:06:35 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-29 12:06:35 -0700 |
commit | aa06eabf63fe9be78f37a34d821346d5a301c00a (patch) | |
tree | 072624330696386fa51beed835378b6041517a06 /luni | |
parent | e64a55a8b5c3840537fb5a94e89c43ec942458b0 (diff) | |
parent | 64c27f0bd158deaa26f9c436e848a7e4cf04dd13 (diff) | |
download | libcore-aa06eabf63fe9be78f37a34d821346d5a301c00a.zip libcore-aa06eabf63fe9be78f37a34d821346d5a301c00a.tar.gz libcore-aa06eabf63fe9be78f37a34d821346d5a301c00a.tar.bz2 |
am 8c5029b: am 210c512: AI 147726: Getting rid of tests.luni.AllTests an
Merge commit '8c5029b6aeb814facb790f4a460d85637401ede3'
* commit '8c5029b6aeb814facb790f4a460d85637401ede3':
AI 147726: Getting rid of tests.luni.AllTests and
Diffstat (limited to 'luni')
4 files changed, 27 insertions, 92 deletions
diff --git a/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/StrictMathTest.java b/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/StrictMathTest.java index 0a811ef..137676c 100644 --- a/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/StrictMathTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/tests/java/lang/StrictMathTest.java @@ -1459,4 +1459,31 @@ public class StrictMathTest extends junit.framework.TestCase { assertEquals("Returned incorrect value", 5.6E-45f, Math .ulp(9.403954E-38f), 0f); } + + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Stress test.", + method = "pow", + args = {double.class, double.class} + ) + public void test_pow_stress() { + assertTrue(Double.longBitsToDouble(-4610068591539890326L) == + StrictMath.pow(-1.0000000000000002e+00, + 4.5035996273704970e+15)); + assertTrue(Double.longBitsToDouble(4601023824101950163L) == + StrictMath.pow(-9.9999999999999978e-01, + 4.035996273704970e+15)); + } + + @TestTargetNew( + level = TestLevel.PARTIAL, + notes = "Stress test.", + method = "tan", + args = {double.class} + ) + public void test_tan_stress(){ + assertTrue(Double.longBitsToDouble(4850236541654588678L) == + StrictMath.tan(1.7765241907548024E+269)); + } + } diff --git a/luni/src/test/java/tests/AllTests.java b/luni/src/test/java/tests/AllTests.java index ddc82ab..9ef1aa8 100644 --- a/luni/src/test/java/tests/AllTests.java +++ b/luni/src/test/java/tests/AllTests.java @@ -38,7 +38,6 @@ public class AllTests suite.addTest(tests.crypto.AllTests.suite()); suite.addTest(tests.dom.AllTests.suite()); suite.addTest(tests.logging.AllTests.suite()); - suite.addTest(tests.luni.AllTests.suite()); suite.addTest(tests.luni.AllTestsIo.suite()); suite.addTest(tests.luni.AllTestsLang.suite()); suite.addTest(tests.luni.AllTestsNet.suite()); diff --git a/luni/src/test/java/tests/java/lang/StrictMath/Fdlibm53Test.java b/luni/src/test/java/tests/java/lang/StrictMath/Fdlibm53Test.java deleted file mode 100644 index d57fef9..0000000 --- a/luni/src/test/java/tests/java/lang/StrictMath/Fdlibm53Test.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package tests.java.lang.StrictMath; - -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - -import junit.framework.TestCase; - -@TestTargetClass(StrictMath.class) -public class Fdlibm53Test extends TestCase { - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Stress test.", - method = "pow", - args = {double.class, double.class} - ) - public void test_pow() { - assertTrue(Double.longBitsToDouble(-4610068591539890326L) == StrictMath.pow(-1.0000000000000002e+00,4.5035996273704970e+15)); - assertTrue(Double.longBitsToDouble(4601023824101950163L) == StrictMath.pow(-9.9999999999999978e-01,4.035996273704970e+15)); - } - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Stress test.", - method = "tan", - args = {double.class} - ) - public void test_tan(){ - assertTrue(Double.longBitsToDouble(4850236541654588678L) == StrictMath.tan( 1.7765241907548024E+269)); - } -} diff --git a/luni/src/test/java/tests/luni/AllTests.java b/luni/src/test/java/tests/luni/AllTests.java deleted file mode 100644 index ff5b05a..0000000 --- a/luni/src/test/java/tests/luni/AllTests.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2007 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package tests.luni; - -import junit.framework.Test; -import junit.framework.TestSuite; -import junit.textui.TestRunner; - -/** - * Listing of all the tests that are to be run. - */ -public class AllTests -{ - - public static void run() { - TestRunner.main(new String[] { AllTests.class.getName() }); - } - - public static final Test suite() { - TestSuite suite = tests.TestSuiteFactory.createTestSuite(); - - suite.addTestSuite(tests.api.java.lang.BooleanTest.class); - suite.addTestSuite(tests.api.java.lang.StringTest.class); - - suite.addTestSuite(tests.java.lang.StrictMath.Fdlibm53Test.class); - - suite.addTestSuite(tests.api.org.apache.harmony.kernel.dalvik.ThreadsTest.class); - return suite; - } -} |