diff options
author | Jorg Pleumann <> | 2009-04-24 13:09:44 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-04-24 13:09:44 -0700 |
commit | 7c53158e08e05982612fef50273e80bf1b550ff4 (patch) | |
tree | bc1c4bcf262ac968f95bc9a07555ae32e37a3a5b | |
parent | 04945ee39ccc25f56c96fd504d19155c47111543 (diff) | |
download | libcore-7c53158e08e05982612fef50273e80bf1b550ff4.zip libcore-7c53158e08e05982612fef50273e80bf1b550ff4.tar.gz libcore-7c53158e08e05982612fef50273e80bf1b550ff4.tar.bz2 |
AI 147726: Getting rid of tests.luni.AllTests and
corresponding CTS packages. The test
suite contains mostly duplicate tests.
Two tests would be better placed in the
StrictMath test suite. Don't know where
to put the ThreadsTest, which seems to
actually test the com.sun.Unsafe class,
so it stays orphaned for now.
BUG=1285921
Automated import of CL 147726
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; - } -} |