diff options
author | Elliott Hughes <enh@google.com> | 2010-02-23 14:57:28 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2010-02-23 14:57:28 -0800 |
commit | 7a076f07b8cc14b9bc8b9639320d28822aa57617 (patch) | |
tree | b0e79cabece68c1ae2761996bfd2fd507c41dced | |
parent | 703ef27278351bd0fd1d50cbd565826f217571da (diff) | |
download | libcore-7a076f07b8cc14b9bc8b9639320d28822aa57617.zip libcore-7a076f07b8cc14b9bc8b9639320d28822aa57617.tar.gz libcore-7a076f07b8cc14b9bc8b9639320d28822aa57617.tar.bz2 |
Remove more useless annotations: logging, luni-kernel, and math.
(Plus a bonus item: one Android-written test under luni.)
39 files changed, 36 insertions, 7931 deletions
diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ErrorManagerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ErrorManagerTest.java index 3185351..d8c0053 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ErrorManagerTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/ErrorManagerTest.java @@ -17,11 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import junit.framework.TestCase; import org.apache.harmony.logging.tests.java.util.logging.HandlerTest.NullOutputStream; @@ -31,7 +26,6 @@ import java.io.OutputStream; import java.io.PrintStream; import java.util.logging.ErrorManager; -@TestTargetClass(ErrorManager.class) public class ErrorManagerTest extends TestCase { @@ -53,12 +47,6 @@ public class ErrorManagerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies positive case only with ErrorManager.GENERIC_FAILURE, impove MockStream", - method = "error", - args = {java.lang.String.class, java.lang.Exception.class, int.class} - ) public void test_errorCheck() { ErrorManager em = new ErrorManager(); MockStream aos = new MockStream(); @@ -71,12 +59,6 @@ public class ErrorManagerTest extends TestCase { assertTrue("message appears (supertest)", aos.getWrittenData().indexOf("supertest") != -1); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies positive case only with ErrorManager.GENERIC_FAILURE", - method = "error", - args = {java.lang.String.class, java.lang.Exception.class, int.class} - ) public void test_errorStringStringint() { ErrorManager em = new ErrorManager(); em.error(null, new NullPointerException(), @@ -85,12 +67,6 @@ public class ErrorManagerTest extends TestCase { em.error(null, null, ErrorManager.GENERIC_FAILURE); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "ErrorManager", - args = {} - ) public void test_constants() { assertEquals(3, ErrorManager.CLOSE_FAILURE); assertEquals(2, ErrorManager.FLUSH_FAILURE); diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java index e4ef413..da0111b 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java @@ -17,12 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.AndroidOnly; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.io.BufferedReader; import java.io.ByteArrayOutputStream; import java.io.File; @@ -54,7 +48,6 @@ import tests.util.TestEnvironment; /** */ -@TestTargetClass(FileHandler.class) public class FileHandlerTest extends TestCase { static LogManager manager = LogManager.getLogManager(); @@ -133,12 +126,6 @@ public class FileHandlerTest extends TestCase { /* * test for constructor void FileHandler() */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify exceptions.", - method = "FileHandler", - args = {} - ) public void testFileHandler() throws Exception { assertEquals("character encoding is non equal to actual value", "iso-8859-1", handler.getEncoding()); @@ -164,12 +151,6 @@ public class FileHandlerTest extends TestCase { /* * test for constructor void FileHandler(String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify security exception.", - method = "FileHandler", - args = {java.lang.String.class} - ) public void testFileHandler_1params() throws Exception { handler = new FileHandler("%t/log/string"); @@ -253,12 +234,6 @@ public class FileHandlerTest extends TestCase { /* * test for constructor void FileHandler(String pattern, boolean append) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify security exception.", - method = "FileHandler", - args = {java.lang.String.class, boolean.class} - ) public void testFileHandler_2params() throws Exception { boolean append = false; do { @@ -302,12 +277,6 @@ public class FileHandlerTest extends TestCase { * test for constructor void FileHandler(String pattern, int limit, int * count) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verifysecurity exception.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class} - ) public void testFileHandler_3params() throws Exception { int limit = 120; int count = 1; @@ -357,12 +326,6 @@ public class FileHandlerTest extends TestCase { * test for constructor public FileHandler(String pattern, int limit, int * count, boolean append) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify security exception.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class, boolean.class} - ) public void testFileHandler_4params() throws Exception { int limit = 120; int count = 1; @@ -417,38 +380,6 @@ public class FileHandlerTest extends TestCase { //expected } } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getEncoding", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getFormatter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getErrorManager", - args = {} - ) - }) public void testDefaultValue() throws Exception { handler.publish(r); handler.close(); @@ -553,12 +484,6 @@ public class FileHandlerTest extends TestCase { e.printStackTrace(); } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class, boolean.class} - ) public void testLimitAndCount() throws Exception { handler.close(); // very small limit value, count=2 @@ -641,44 +566,6 @@ public class FileHandlerTest extends TestCase { reset("log", ""); } } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "close", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "FileHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "FileHandler", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "FileHandler", - args = {java.lang.String.class, boolean.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class, boolean.class} - ) - }) public void testSecurity() throws IOException { SecurityManager currentManager = System.getSecurityManager(); @@ -722,44 +609,6 @@ public class FileHandlerTest extends TestCase { } } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "close", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "FileHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "FileHandler", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "FileHandler", - args = {java.lang.String.class, boolean.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class, boolean.class} - ) - }) public void testFileSecurity() throws IOException { SecurityManager currentManager = System.getSecurityManager(); @@ -802,12 +651,6 @@ public class FileHandlerTest extends TestCase { System.setSecurityManager(currentManager); } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies FileHandler when configuration file is invalid.", - method = "FileHandler", - args = {} - ) public void testInvalidProperty() throws Exception { props.put("java.util.logging.FileHandler.level", "null"); props.put("java.util.logging.FileHandler.filter", className @@ -842,33 +685,7 @@ public class FileHandlerTest extends TestCase { } catch (NullPointerException e) { } } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies illegal parameters and exceptions: IOException, NullPointerException, IllegalArgumentException.", - method = "FileHandler", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies illegal parameters and exceptions: IOException, NullPointerException, IllegalArgumentException.", - method = "FileHandler", - args = {java.lang.String.class, boolean.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies illegal parameters and exceptions: IOException, NullPointerException, IllegalArgumentException.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies illegal parameters and exceptions: IOException, NullPointerException, IllegalArgumentException.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) - }) - @AndroidOnly("This test fails on RI. Doesn't parse special pattern \"%t/%h.") + // This test fails on RI. Doesn't parse special pattern \"%t/%h." public void testInvalidParams() throws IOException { // %t and %p parsing can add file separator automatically @@ -987,12 +804,6 @@ public class FileHandlerTest extends TestCase { /* * test for method public void publish(LogRecord record) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish() throws Exception { LogRecord[] r = new LogRecord[] { new LogRecord(Level.CONFIG, "msg__"), new LogRecord(Level.WARNING, "message"), @@ -1010,12 +821,6 @@ public class FileHandlerTest extends TestCase { /* * test for method public void close() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "close", - args = {} - ) public void testClose() throws Exception { FileHandler h = new FileHandler("%t/log/stringPublish"); h.publish(r); @@ -1023,12 +828,6 @@ public class FileHandlerTest extends TestCase { assertFileContent(TEMPPATH + SEP + "log", "stringPublish", h .getFormatter()); } - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Doesn't verify SecurityException.", - method = "setOutputStream", - args = {java.io.OutputStream.class} - ) // set output stream still works, just like super StreamHandler public void testSetOutputStream() throws Exception { MockFileHandler handler = new MockFileHandler("%h/setoutput.log"); @@ -1045,12 +844,6 @@ public class FileHandlerTest extends TestCase { assertFileContent(HOMEPATH, "setoutput.log", handler.getFormatter()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IllegalArgumentException.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class} - ) public void testEmptyPattern_3params() throws SecurityException, IOException { try { @@ -1060,12 +853,6 @@ public class FileHandlerTest extends TestCase { // Expected } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IllegalArgumentException.", - method = "FileHandler", - args = {java.lang.String.class, boolean.class} - ) public void testEmptyPattern_2params() throws SecurityException, IOException { try { @@ -1075,12 +862,6 @@ public class FileHandlerTest extends TestCase { // Expected } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IllegalArgumentException.", - method = "FileHandler", - args = {java.lang.String.class, int.class, int.class, boolean.class} - ) public void testEmptyPattern_4params() throws SecurityException, IOException { try { diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FormatterTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FormatterTest.java index ba2345d..47b9170 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FormatterTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FormatterTest.java @@ -17,12 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.AndroidOnly; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestLevel; - import java.io.File; import java.text.MessageFormat; import java.util.Locale; @@ -40,7 +34,6 @@ import junit.framework.TestCase; import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper; -@TestTargetClass(Formatter.class) public class FormatterTest extends TestCase { Formatter f; @@ -97,26 +90,6 @@ public class FormatterTest extends TestCase { /* * test for constructor protected Formatter() */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "Formatter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getHead", - args = {java.util.logging.Handler.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getTail", - args = {java.util.logging.Handler.class} - ) - }) public void testFormatter() { assertEquals("head string is not empty", "", f.getHead(null)); assertEquals("tail string is not empty", "", f.getTail(null)); @@ -126,12 +99,6 @@ public class FormatterTest extends TestCase { /* * test for method public String getHead(Handler h) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getHead", - args = {Handler.class} - ) public void testGetHead() { assertEquals("head string is not empty", "", f.getHead(null)); assertEquals("head string is not empty", "", f.getHead(h)); @@ -142,12 +109,6 @@ public class FormatterTest extends TestCase { /* * test for method public String getTail(Handler h) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getTail", - args = {Handler.class} - ) public void testGetTail() { assertEquals("tail string is not empty", "", f.getTail(null)); assertEquals("tail string is not empty", "", f.getTail(h)); @@ -155,16 +116,10 @@ public class FormatterTest extends TestCase { assertEquals("tail string is not empty", "", f.getTail(h)); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "formatMessage", - args = {LogRecord.class} - ) - @AndroidOnly("The RI fails in this test because it uses a MessageFormat " + - "to format the message even though it doesn't contain \"{0\". " + - "The spec says that this would indicate that a MessageFormat " + - "should be used and else no formatting should be done.") + // The RI fails in this test because it uses a MessageFormat + // to format the message even though it doesn't contain "{0". + // The spec says that this would indicate that a MessageFormat + // should be used and else no formatting should be done. public void testFormatMessage() { assertEquals(MSG, f.formatMessage(r)); @@ -200,12 +155,6 @@ public class FormatterTest extends TestCase { assertEquals(pattern, f.formatMessage(r)); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "formatMessage", - args = {LogRecord.class} - ) public void testLocalizedFormatMessage() { // normal case r.setMessage("msg"); diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LevelTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LevelTest.java index 1fee1ba..2dbe206 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LevelTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LevelTest.java @@ -17,11 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestLevel; - import java.io.Serializable; import java.util.ResourceBundle; import java.util.logging.Handler; @@ -36,7 +31,6 @@ import org.apache.harmony.testframework.serialization.SerializationTest.Serializ * This class implements Serializable, so that the non-static inner class * MockLevel can be Serializable. */ -@TestTargetClass(Level.class) public class LevelTest extends TestCase implements Serializable { private static final long serialVersionUID = 1L; @@ -45,20 +39,6 @@ public class LevelTest extends TestCase implements Serializable { * Test the constructor without resource bundle parameter using normal * values. As byproducts, getName & intValue are also tested. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks the constructor without resource bundle parameter using normal values.", - method = "Level", - args = {java.lang.String.class, int.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks the constructor without resource bundle parameter using normal values.", - method = "getName", - args = {} - ) - }) public void testConstructorNoResBundle_Normal() { MockLevel l = new MockLevel("level1", 1); assertEquals("level1", l.getName()); @@ -70,20 +50,6 @@ public class LevelTest extends TestCase implements Serializable { * Test the constructor without resource bundle parameter using null name. * As byproducts, getName & intValue are also tested. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks the constructor without resource bundle parameter using null name.", - method = "Level", - args = {java.lang.String.class, int.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks the constructor without resource bundle parameter using null name.", - method = "getName", - args = {} - ) - }) public void testConstructorNoResBundle_NullName() { try { new MockLevel(null, -2); @@ -97,20 +63,6 @@ public class LevelTest extends TestCase implements Serializable { * Test the constructor without resource bundle parameter using empty name. * As byproducts, getName & intValue are also tested. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks the constructor without resource bundle parameter using empty name.", - method = "Level", - args = {java.lang.String.class, int.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks the constructor without resource bundle parameter using empty name.", - method = "getName", - args = {} - ) - }) public void testConstructorNoResBundle_EmptyName() { MockLevel l = new MockLevel("", -3); assertEquals("", l.getName()); @@ -122,20 +74,6 @@ public class LevelTest extends TestCase implements Serializable { * Test the constructor having resource bundle parameter using normal * values. As byproducts, getName & intValue are also tested. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "Level", - args = {java.lang.String.class, int.class, java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getName", - args = {} - ) - }) public void testConstructorHavingResBundle_Normal() { MockLevel l = new MockLevel("level1", 1, "resourceBundle"); assertEquals("level1", l.getName()); @@ -147,12 +85,6 @@ public class LevelTest extends TestCase implements Serializable { * Test the constructor having resource bundle parameter using null names. * As byproducts, getName & intValue are also tested. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks NullPointerException.", - method = "Level", - args = {java.lang.String.class, int.class, java.lang.String.class} - ) public void testConstructorHavingResBundle_NullName() { try { new MockLevel(null, -123, "qwe"); @@ -167,12 +99,6 @@ public class LevelTest extends TestCase implements Serializable { names. * As byproducts, getName & intValue are also tested. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor having resource bundle parameter using empty names.", - method = "Level", - args = {java.lang.String.class, int.class, java.lang.String.class} - ) public void testConstructorHavingResBundle_EmptyName() { MockLevel l = new MockLevel("", -1000, ""); assertEquals("", l.getName()); @@ -183,12 +109,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method parse, with the pre-defined string consts. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies parse, with the pre-defined string consts.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_PredefinedConstStrings() { assertSame(Level.SEVERE, Level.parse("SEVERE")); assertSame(Level.WARNING, Level.parse("WARNING")); @@ -204,12 +124,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method parse, with an undefined string. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "IllegalArgumentException is verified.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_IllegalConstString() { try { Level.parse("SEVERe"); @@ -222,12 +136,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method parse, with a null string. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies null as a parameter.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_NullString() { try { Level.parse(null); @@ -240,12 +148,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method parse, with pre-defined valid number strings. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies parse, with pre-defined valid number strings.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_PredefinedNumber() { assertSame(Level.SEVERE, Level.parse("SEVERE")); assertSame(Level.WARNING, Level.parse("WARNING")); @@ -270,12 +172,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method parse, with an undefined valid number strings. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies parse, with an undefined valid number strings.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_UndefinedNumber() { Level l = Level.parse("0"); assertEquals(0, l.intValue()); @@ -286,12 +182,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method parse, with an undefined valid number strings with spaces. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies parse, with an undefined valid number strings with spaces.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_UndefinedNumberWithSpaces() { try { Level.parse(" 0"); @@ -299,12 +189,6 @@ public class LevelTest extends TestCase implements Serializable { // expected } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies negative number.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_NegativeNumber() { Level l = Level.parse("-4"); assertEquals(-4, l.intValue()); @@ -316,12 +200,6 @@ public class LevelTest extends TestCase implements Serializable { * Test method parse, expecting the same objects will be returned given the * same name, even for non-predefined levels. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies parse, expecting the same objects will be returned given the same name, even for non-predefined levels.", - method = "parse", - args = {java.lang.String.class} - ) public void testParse_SameObject() { Level l = Level.parse("-100"); assertSame(l, Level.parse("-100")); @@ -330,12 +208,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test method hashCode, with normal fields. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "hashCode", - args = {} - ) public void testHashCode_Normal() { assertEquals(100, Level.parse("100").hashCode()); assertEquals(-1, Level.parse("-1").hashCode()); @@ -346,12 +218,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test equals when two objects are equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't check negative case.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEquals_Equal() { MockLevel l1 = new MockLevel("level1", 1); MockLevel l2 = new MockLevel("level2", 1); @@ -362,12 +228,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test equals when two objects are not equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks negative case.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEquals_NotEqual() { MockLevel l1 = new MockLevel("level1", 1); MockLevel l2 = new MockLevel("level1", 2); @@ -378,12 +238,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test equals when the other object is null. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks null as a parameter.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEquals_Null() { assertFalse(Level.ALL.equals(null)); } @@ -391,12 +245,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test equals when the other object is not an instance of Level. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks negative case.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEquals_NotLevel() { assertFalse(Level.ALL.equals(new Object())); } @@ -404,12 +252,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test equals when the other object is itself. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Checks equals when the other object is itself.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEquals_Itself() { assertTrue(Level.ALL.equals(Level.ALL)); } @@ -417,12 +259,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test toString of a normal Level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toString", - args = {} - ) public void testToString_Normal() { assertEquals("ALL", Level.ALL.toString()); @@ -457,12 +293,6 @@ public class LevelTest extends TestCase implements Serializable { * Test serialization of pre-defined const levels. It is expected that the * deserialized cost level should be the same instance as the existing one. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Serialization of pre-defined const levels. ", - method = "!SerializationSelf", - args = {} - ) public void testSerialization_ConstLevel() throws Exception { SerializationTest.verifySelf(Level.ALL, @@ -475,12 +305,6 @@ public class LevelTest extends TestCase implements Serializable { * Test serialization of normal instance of Level. It is expected that the * deserialized level object should be equal to the original one. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Test serialization of normal instance of Level.", - method = "!SerializationSelf", - args = {} - ) public void testSerialization_InstanceLevel() throws Exception { // tests that objects are the same @@ -500,23 +324,11 @@ public class LevelTest extends TestCase implements Serializable { /** * @tests serialization/deserialization compatibility with RI. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Serialization/deserialization compatibility", - method = "!SerializationGolden", - args = {} - ) public void testSerializationCompatibility() throws Exception { SerializationTest.verifyGolden(this, new MockLevel("123", 123, "bundle"), LEVEL_COMPARATOR); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLocalizedName", - args = {} - ) public void testGetLocalName() { ResourceBundle rb = ResourceBundle.getBundle("bundles/java/util/logging/res"); Level l = new MockLevel("level1", 120, @@ -543,12 +355,6 @@ public class LevelTest extends TestCase implements Serializable { /* * test for method public String getResourceBundleName() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getResourceBundleName", - args = {} - ) public void testGetResourceBundleName() { String bundleName = "bundles/java/util/logging/res"; Level l = new MockLevel("level1", 120); @@ -565,12 +371,6 @@ public class LevelTest extends TestCase implements Serializable { /* * test for method public final int intValue() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "intValue", - args = {} - ) public void testIntValue() { int value1 = 120; Level l = new MockLevel("level1", value1); @@ -582,12 +382,6 @@ public class LevelTest extends TestCase implements Serializable { /* * Test defining new levels in subclasses of Level */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Test defining new levels in subclasses of Level", - method = "parse", - args = {java.lang.String.class} - ) public void testSubclassNewLevel() { MyLevel.DUPLICATENAME.getName();// just to load MyLevel class diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java index 4768837..eff8745 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java @@ -40,11 +40,6 @@ import junit.framework.TestCase; import org.apache.harmony.logging.tests.java.util.logging.HandlerTest.NullOutputStream; import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper; -import dalvik.annotation.SideEffect; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargets; import tests.util.TestEnvironment; /** @@ -52,7 +47,6 @@ import tests.util.TestEnvironment; * add/get logger(dot) * */ -@TestTargetClass(LogManager.class) public class LogManagerTest extends TestCase { private static final String FOO = "LogManagerTestFoo"; @@ -113,12 +107,6 @@ public class LogManagerTest extends TestCase { handler = null; } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "LogManager", - args = {} - ) public void testLogManager() { class TestLogManager extends LogManager { public TestLogManager() { @@ -129,20 +117,6 @@ public class LogManagerTest extends TestCase { assertNotNull(tlm.toString()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies NullPointerException.", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies NullPointerException.", - method = "getLogger", - args = {java.lang.String.class} - ) - }) public void testAddGetLogger() { Logger log = new MockLogger(FOO, null); Logger foo = mockManager.getLogger(FOO); @@ -176,20 +150,6 @@ public class LogManagerTest extends TestCase { assertEquals(i, 1); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) - }) public void testAddGetLogger_duplicateName() { // add logger with duplicate name has no effect Logger foo = new MockLogger(FOO, null); @@ -207,20 +167,6 @@ public class LogManagerTest extends TestCase { assertEquals(1, i); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) - }) public void testAddGetLogger_Hierachy() { Logger foo = new MockLogger("testAddGetLogger_Hierachy.foo", null); Logger child = new MockLogger("testAddGetLogger_Hierachy.foo.child", null); @@ -260,20 +206,6 @@ public class LogManagerTest extends TestCase { assertSame(otherChild, grandson.getParent()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) - }) public void testAddLoggerReverseOrder() { Logger root = new MockLogger("testAddLoggerReverseOrder", null); Logger foo = new MockLogger("testAddLoggerReverseOrder.foo", null); @@ -306,12 +238,6 @@ public class LogManagerTest extends TestCase { assertSame(realRoot, root.getParent()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addLogger", - args = {java.util.logging.Logger.class} - ) public void testAddSimiliarLogger() { Logger root = new MockLogger("testAddSimiliarLogger", null); Logger foo = new MockLogger("testAddSimiliarLogger.foo", null); @@ -343,20 +269,6 @@ public class LogManagerTest extends TestCase { assertSame(fooo, foooChild.getParent()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) - }) public void testAddGetLogger_nameWithSpace() { Logger foo = new MockLogger(FOO, null); Logger fooBeforeSpace = new MockLogger(FOO + " ", null); @@ -373,20 +285,6 @@ public class LogManagerTest extends TestCase { assertSame(fooWithBothSpace, mockManager.getLogger(" " + FOO + " ")); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify NullPointerException", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) - }) public void testAddGetLogger_addRoot() { Logger foo = new MockLogger(FOO, null); Logger fooChild = new MockLogger(FOO + ".child", null); @@ -417,20 +315,6 @@ public class LogManagerTest extends TestCase { /** * @tests java.util.logging.LogManager#addLogger(Logger) */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addLogger", - args = {java.util.logging.Logger.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogManager", - args = {} - ) - }) public void test_addLoggerLLogger_Security() throws Exception { // regression test for Harmony-1286 SecurityManager originalSecurityManager = System.getSecurityManager(); @@ -449,12 +333,6 @@ public class LogManagerTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testDefaultLoggerProperties() throws Exception { // mock LogManager has no default logger assertNull(mockManager.getLogger("")); @@ -500,20 +378,6 @@ public class LogManagerTest extends TestCase { * case 4: check correct tested value */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLoggerNames", - args = {} - ) - }) public void testGetLogger() throws Exception { // case 1: test default and valid value @@ -550,20 +414,6 @@ public class LogManagerTest extends TestCase { /* * test for method public Logger getLogger(String name) */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "getLoggerNames", - args = {} - ) - }) public void testGetLogger_duplicateName() throws Exception { // test duplicate name // add logger with duplicate name has no effect @@ -587,12 +437,6 @@ public class LogManagerTest extends TestCase { /* * test for method public Logger getLogger(String name) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_hierachy() throws Exception { // test hierachy Logger foo = new MockLogger("testGetLogger_hierachy.foo", null); @@ -605,12 +449,6 @@ public class LogManagerTest extends TestCase { /* * test for method public Logger getLogger(String name) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_nameSpace() throws Exception { // test name with space Logger foo = new MockLogger(FOO, null); @@ -631,20 +469,6 @@ public class LogManagerTest extends TestCase { /* * test for method public void checkAccess() throws SecurityException */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "checkAccess", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLogManager", - args = {} - ) - }) public void testCheckAccess() { try { manager.checkAccess(); @@ -666,44 +490,6 @@ public class LogManagerTest extends TestCase { System.setSecurityManager(securityManager); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "readConfiguration", - args = {java.io.InputStream.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "readConfiguration", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "checkAccess", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "reset", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "getLogManager", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "addPropertyChangeListener", - args = {java.beans.PropertyChangeListener.class} - ) - }) public void testLoggingPermission() throws IOException { System.setSecurityManager(new MockSecurityManagerLogPermission()); mockManager.addLogger(new MockLogger("abc", null)); @@ -756,20 +542,6 @@ public class LogManagerTest extends TestCase { } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "readConfiguration", - args = {java.io.InputStream.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getProperty", - args = {java.lang.String.class} - ) - }) public void testMockGetProperty() throws Exception { // mock manager doesn't read configuration until you call // readConfiguration() @@ -788,12 +560,6 @@ public class LogManagerTest extends TestCase { assertEquals(0, mockManager.getLogger("").getHandlers().length); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getProperty", - args = {java.lang.String.class} - ) public void testGetProperty() throws SecurityException, IOException { Logger root = manager.getLogger(""); @@ -810,12 +576,6 @@ public class LogManagerTest extends TestCase { manager.reset(); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies NullPointerException.", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testReadConfiguration_null() throws SecurityException, IOException { try { manager.readConfiguration(null); @@ -892,12 +652,6 @@ public class LogManagerTest extends TestCase { /* * Class under test for void readConfiguration(InputStream) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testReadConfigurationInputStream() throws IOException { Logger foo = new MockLogger(FOO, null); @@ -928,12 +682,6 @@ public class LogManagerTest extends TestCase { assertSame(l, h.getLevel()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies NullPointerException.", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testReadConfigurationInputStream_null() throws SecurityException, IOException { try { mockManager.readConfiguration(null); @@ -942,12 +690,6 @@ public class LogManagerTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IOException.", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testReadConfigurationInputStream_IOException_1parm() throws SecurityException { try { mockManager.readConfiguration(new MockInputStream()); @@ -958,12 +700,6 @@ public class LogManagerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testReadConfigurationInputStream_root() throws IOException { manager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props)); @@ -1028,20 +764,6 @@ public class LogManagerTest extends TestCase { assertEquals(0, logger.getHandlers().length); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addPropertyChangeListener", - args = {java.beans.PropertyChangeListener.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "removePropertyChangeListener", - args = {java.beans.PropertyChangeListener.class} - ) - }) public void testAddRemovePropertyChangeListener() throws Exception { MockPropertyChangeListener listener1 = new MockPropertyChangeListener(); MockPropertyChangeListener listener2 = new MockPropertyChangeListener(); @@ -1088,20 +810,6 @@ public class LogManagerTest extends TestCase { assertNull(listener2.getEvent()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addPropertyChangeListener", - args = {java.beans.PropertyChangeListener.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "removePropertyChangeListener", - args = {java.beans.PropertyChangeListener.class} - ) - }) public void testAddRemovePropertyChangeListener_null() { // seems nothing happened try{ @@ -1112,12 +820,6 @@ public class LogManagerTest extends TestCase { mockManager.removePropertyChangeListener(null); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify SecurityException.", - method = "reset", - args = {} - ) public void testReset() throws SecurityException, IOException { // mock LogManager mockManager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props)); @@ -1153,12 +855,6 @@ public class LogManagerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Doesn't verify SecurityException.", - method = "readConfiguration", - args = {java.io.InputStream.class} - ) public void testGlobalPropertyConfig() throws Exception { PrintStream err = System.err; try { @@ -1232,12 +928,6 @@ public class LogManagerTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "readConfiguration", - args = {} - ) public void testValidConfigClass() throws Exception { // System.setProperty("java.util.logging.config.class", "org.apache.harmony.logging.tests.java.util.logging.LogManagerTest$ConfigClass"); System.setProperty("java.util.logging.config.class", this.getClass().getName() diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java index 6d4f784..7d8757e 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogRecordTest.java @@ -17,11 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.io.Serializable; import java.util.Locale; import java.util.ResourceBundle; @@ -36,7 +31,6 @@ import junit.framework.TestCase; import org.apache.harmony.testframework.serialization.SerializationTest; import org.apache.harmony.testframework.serialization.SerializationTest.SerializableAssert; -@TestTargetClass(LogRecord.class) public class LogRecordTest extends TestCase { static final String MSG = "test msg, pls. ignore itb"; @@ -50,12 +44,6 @@ public class LogRecordTest extends TestCase { lr = new LogRecord(Level.CONFIG, MSG); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "LogRecord", - args = {java.util.logging.Level.class, java.lang.String.class} - ) public void testLogRecordWithNullPointers() { try { new LogRecord(null, null); @@ -72,20 +60,6 @@ public class LogRecordTest extends TestCase { assertNull(r.getMessage()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "normally set/get don't need to be tested", - method = "getLoggerName", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "normally set/get don't need to be tested", - method = "setLoggerName", - args = {java.lang.String.class} - ) - }) public void testGetSetLoggerName() { assertNull(lr.getLoggerName()); lr.setLoggerName(null); @@ -94,21 +68,6 @@ public class LogRecordTest extends TestCase { assertEquals("test logger name", lr.getLoggerName()); } - - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getResourceBundle", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setResourceBundle", - args = {java.util.ResourceBundle.class} - ) - }) public void testGetSetResourceBundle() { assertNull(lr.getResourceBundleName()); assertNull(lr.getResourceBundle()); @@ -127,20 +86,6 @@ public class LogRecordTest extends TestCase { assertNull(lr.getResourceBundleName()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getResourceBundleName", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setResourceBundleName", - args = {java.lang.String.class} - ) - }) public void testGetSetResourceBundleName() { assertNull(lr.getResourceBundleName()); lr.setResourceBundleName(null); @@ -149,20 +94,6 @@ public class LogRecordTest extends TestCase { assertEquals("test", lr.getResourceBundleName()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "normal behavior of getter/setter don't need to be tested (normally)", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "normal behavior of getter/setter don't need to be tested (normally)", - method = "setLevel", - args = {java.util.logging.Level.class} - ) - }) public void testGetSetLevelNormal() { assertSame(lr.getLevel(), Level.CONFIG); lr.setLevel(Level.ALL); @@ -171,20 +102,6 @@ public class LogRecordTest extends TestCase { assertSame(lr.getLevel(), Level.FINEST); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setLevel", - args = {java.util.logging.Level.class} - ) - }) public void testGetSetLevelNullPointerException() { try { lr.setLevel(null); @@ -194,20 +111,6 @@ public class LogRecordTest extends TestCase { assertSame(lr.getLevel(), Level.CONFIG); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getSequenceNumber", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setSequenceNumber", - args = {long.class} - ) - }) public void testGetSetSequenceNumber() { long l = lr.getSequenceNumber(); lr.setSequenceNumber(-111); @@ -218,20 +121,6 @@ public class LogRecordTest extends TestCase { assertEquals(lr.getSequenceNumber(), l + 1); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getSourceClassName", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setSourceClassName", - args = {java.lang.String.class} - ) - }) public void testGetSetSourceClassName() { lr.setSourceClassName(null); assertNull(lr.getSourceClassName()); @@ -241,20 +130,6 @@ public class LogRecordTest extends TestCase { assertEquals(this.getClass().getName(), lr.getSourceClassName()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getSourceMethodName", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "setSourceMethodName", - args = {java.lang.String.class} - ) - }) public void testGetSetSourceMethodName() { lr.setSourceMethodName(null); assertNull(lr.getSourceMethodName()); @@ -264,32 +139,6 @@ public class LogRecordTest extends TestCase { assertEquals(this.getClass().getName(), lr.getSourceMethodName()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getSourceMethodName", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "setSourceMethodName", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getSourceClassName", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "setSourceClassName", - args = {java.lang.String.class} - ) - }) public void testGetSourceDefaultValue() { assertNull(lr.getSourceMethodName()); assertNull(lr.getSourceClassName()); @@ -363,20 +212,6 @@ public class LogRecordTest extends TestCase { logger.removeHandler(handler); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getMessage", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setMessage", - args = {java.lang.String.class} - ) - }) public void testGetSetMessage() { assertEquals(MSG, lr.getMessage()); lr.setMessage(null); @@ -385,20 +220,6 @@ public class LogRecordTest extends TestCase { assertEquals("", lr.getMessage()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getParameters", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setParameters", - args = {java.lang.Object[].class} - ) - }) public void testGetSetParameters() { assertNull(lr.getParameters()); lr.setParameters(null); @@ -411,20 +232,6 @@ public class LogRecordTest extends TestCase { assertSame(oa, lr.getParameters()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getMillis", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setMillis", - args = {long.class} - ) - }) public void testGetSetMillis() { long milli = lr.getMillis(); assertTrue(milli > 0); @@ -434,20 +241,6 @@ public class LogRecordTest extends TestCase { assertEquals(0, lr.getMillis()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getMillis", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setMillis", - args = {long.class} - ) - }) public void testGetSetTimeCheck() { long before = lr.getMillis(); try { @@ -462,20 +255,6 @@ public class LogRecordTest extends TestCase { - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getThreadID", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setThreadID", - args = {int.class} - ) - }) public void testGetSetThreadID() { int id = lr.getThreadID(); lr = new LogRecord(Level.ALL, "a1"); @@ -489,20 +268,6 @@ public class LogRecordTest extends TestCase { /* * Check threadID are different */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getThreadID", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setThreadID", - args = {int.class} - ) - }) public void testGetSetThreadID_DifferentThread() { int id = lr.getThreadID(); // Create and start the thread @@ -529,20 +294,6 @@ public class LogRecordTest extends TestCase { } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getThrown", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setThrown", - args = {java.lang.Throwable.class} - ) - }) public void testGetSetThrown() { assertNull(lr.getThrown()); lr.setThrown(null); @@ -600,12 +351,6 @@ public class LogRecordTest extends TestCase { /** * @tests serialization/deserialization compatibility. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "serialisation/deserialization", - method = "!SerializationSelf", - args = {} - ) public void testSerializationSelf() throws Exception { LogRecord r = new LogRecord(Level.ALL, "msg"); r.setLoggerName("LoggerName"); @@ -624,12 +369,6 @@ public class LogRecordTest extends TestCase { /** * @tests resolution of resource bundle for serialization/deserialization. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "tests resolution of resource bundle during deserialization", - method = "!Serialization", - args = {} - ) public void testSerializationResourceBundle() throws Exception { // test case: valid resource bundle name @@ -653,12 +392,6 @@ public class LogRecordTest extends TestCase { /** * @tests serialization/deserialization compatibility with RI. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "!SerializationGolden", - args = {} - ) public void testSerializationCompatibility() throws Exception { LogRecord r = new LogRecord(Level.ALL, "msg"); r.setLoggerName("LoggerName"); diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java index f2bd62d..c05b9a5 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggerTest.java @@ -17,6 +17,8 @@ package org.apache.harmony.logging.tests.java.util.logging; +import dalvik.annotation.SideEffect; + import java.security.Permission; import java.util.Locale; import java.util.MissingResourceException; @@ -37,16 +39,10 @@ import junit.framework.TestCase; import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper; import tests.util.CallVerificationStack; -import dalvik.annotation.SideEffect; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargets; /** * Test suite for the class java.util.logging.Logger. */ -@TestTargetClass(Logger.class) public class LoggerTest extends TestCase { private final static String VALID_RESOURCE_BUNDLE = "bundles/java/util/logging/res"; @@ -95,12 +91,6 @@ public class LoggerTest extends TestCase { /* * Test the global logger */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "Logger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGlobalLogger() { assertNull(Logger.global.getFilter()); assertEquals(0, Logger.global.getHandlers().length); @@ -118,12 +108,6 @@ public class LoggerTest extends TestCase { /* * Test constructor under normal conditions. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies constructor under normal conditions.", - method = "Logger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testConstructor_Normal() { MockLogger mlog = new MockLogger("myname", VALID_RESOURCE_BUNDLE); assertNull(mlog.getFilter()); @@ -140,12 +124,6 @@ public class LoggerTest extends TestCase { /* * Test constructor with null parameters. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies constructor with null parameters.", - method = "Logger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testConstructor_Null() { MockLogger mlog = new MockLogger(null, null); assertNull(mlog.getFilter()); @@ -161,12 +139,6 @@ public class LoggerTest extends TestCase { /* * Test constructor with invalid name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies constructor with invalid name.", - method = "Logger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testConstructor_InvalidName() { MockLogger mlog = new MockLogger("...#$%%^&&()-_+=!@~./,[]{};:'\\\"?|", null); @@ -176,12 +148,6 @@ public class LoggerTest extends TestCase { /* * Test constructor with empty name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies constructor with empty name.", - method = "Logger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testConstructor_EmptyName() { MockLogger mlog = new MockLogger("", null); assertEquals("", mlog.getName()); @@ -190,12 +156,6 @@ public class LoggerTest extends TestCase { /* * Test constructor with invalid resource bundle name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies MissingResourceException.", - method = "Logger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testConstructor_InvalidResourceBundle() { // try anonymous with invalid resource @@ -225,12 +185,6 @@ public class LoggerTest extends TestCase { /* * Test getAnonymousLogger() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getAnonymousLogger", - args = {} - ) public void testGetAnonymousLogger() { Logger alog = Logger.getAnonymousLogger(); assertNotSame(alog, Logger.getAnonymousLogger()); @@ -249,12 +203,6 @@ public class LoggerTest extends TestCase { * Test getAnonymousLogger(String resourceBundleName) with valid resource * bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getAnonymousLogger(String resourceBundleName) with valid resource bundle.", - method = "getAnonymousLogger", - args = {java.lang.String.class} - ) public void testGetAnonymousLogger_ValidResourceBundle() { Logger alog = Logger.getAnonymousLogger(VALID_RESOURCE_BUNDLE); assertNotSame(alog, Logger.getAnonymousLogger(VALID_RESOURCE_BUNDLE)); @@ -273,12 +221,6 @@ public class LoggerTest extends TestCase { * Test getAnonymousLogger(String resourceBundleName) with null resource * bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getAnonymousLogger(String resourceBundleName) with null resource bundle.", - method = "getAnonymousLogger", - args = {java.lang.String.class} - ) public void testGetAnonymousLogger_NullResourceBundle() { Logger alog = Logger.getAnonymousLogger(null); assertNotSame(alog, Logger.getAnonymousLogger(null)); @@ -297,12 +239,6 @@ public class LoggerTest extends TestCase { * Test getAnonymousLogger(String resourceBundleName) with invalid resource * bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getAnonymousLogger(String resourceBundleName) with invalid resource bundle.", - method = "getAnonymousLogger", - args = {java.lang.String.class} - ) public void testGetAnonymousLogger_InvalidResourceBundle() { try { Logger.getAnonymousLogger(INVALID_RESOURCE_BUNDLE); @@ -320,12 +256,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String), getting a logger with no parent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String), getting a logger with no parent.", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_Normal() throws Exception { // config the level Properties p = new Properties(); @@ -359,12 +289,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String), getting a logger with invalid level configured. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String), getting a logger with invalid level configured.", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_InvalidLevel() throws Exception { // config the level Properties p = new Properties(); @@ -390,12 +314,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String) with null name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String) with null name.", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_Null() { try { Logger.getLogger(null); @@ -414,12 +332,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String) with invalid name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String) with invalid name.", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_Invalid() { Logger log = Logger.getLogger("...#$%%^&&()-_+=!@~./,[]{};:'\\\"?|"); assertEquals("...#$%%^&&()-_+=!@~./,[]{};:'\\\"?|", log.getName()); @@ -428,12 +340,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String) with empty name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String) with empty name.", - method = "getLogger", - args = {java.lang.String.class} - ) public void testGetLogger_Empty() { assertNotNull(LogManager.getLogManager().getLogger("")); Logger log = Logger.getLogger(""); @@ -452,12 +358,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String), getting a logger with existing parent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String), getting a logger with existing parent.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLogger_WithParent() { assertNull(LogManager.getLogManager().getLogger( "testGetLogger_WithParent_ParentLogger")); @@ -544,12 +444,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String, String), getting a logger with no parent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String), getting a logger with no parent.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_Normal() throws Exception { // config the level Properties p = new Properties(); @@ -583,12 +477,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String, String) with null parameters. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with null parameters.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_Null() { Logger.getLogger("testGetLoggerWithRes_Null_ANewLogger", null); try { @@ -602,12 +490,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String, String) with invalid resource bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with invalid resource bundle.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_InvalidResourceBundle() { assertNull(LogManager.getLogManager().getLogger( @@ -645,12 +527,6 @@ public class LoggerTest extends TestCase { * Test getLogger(String, String) with valid resource bundle, to get an * existing logger with no associated resource bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with valid resource bundle, to get an existing logger with no associated resource bundle.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_ExistingLoggerWithNoRes() { assertNull(LogManager.getLogManager().getLogger( "testGetLoggerWithRes_ExistingLoggerWithNoRes_ANewLogger")); @@ -671,12 +547,6 @@ public class LoggerTest extends TestCase { * Test getLogger(String, String) with valid resource bundle, to get an * existing logger with the same associated resource bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with valid resource bundle, to get an existing logger with the same associated resource bundle.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_ExistingLoggerWithSameRes() { assertNull(LogManager.getLogManager().getLogger( "testGetLoggerWithRes_ExistingLoggerWithSameRes_ANewLogger")); @@ -697,12 +567,6 @@ public class LoggerTest extends TestCase { * Test getLogger(String, String) with valid resource bundle, to get an * existing logger with different associated resource bundle. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with valid resource bundle, to get an existing logger with different associated resource bundle.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_ExistingLoggerWithDiffRes() { assertNull(LogManager.getLogManager().getLogger( "testGetLoggerWithRes_ExistingLoggerWithDiffRes_ANewLogger")); @@ -734,12 +598,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String, String) with invalid name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with invalid name.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_InvalidName() { Logger log = Logger.getLogger( "...#$%%^&&()-_+=!@~./,[]{};:'\\\"?|WithRes", @@ -751,12 +609,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String, String) with empty name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String) with empty name.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) @SideEffect("Attaches ResourceBundle to anonymous logger; irreversible") public void testGetLoggerWithRes_Empty() { Logger log = Logger.getLogger("", VALID_RESOURCE_BUNDLE); @@ -775,12 +627,6 @@ public class LoggerTest extends TestCase { /* * Test getLogger(String, String), getting a logger with existing parent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getLogger(String, String), getting a logger with existing parent.", - method = "getLogger", - args = {java.lang.String.class, java.lang.String.class} - ) public void testGetLoggerWithRes_WithParentNormal() { assertNull(LogManager.getLogManager().getLogger( "testGetLoggerWithRes_WithParent_ParentLogger")); @@ -812,12 +658,6 @@ public class LoggerTest extends TestCase { /* * Test addHandler(Handler) for a named logger with sufficient privilege. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_NamedLoggerSufficientPrivilege() { Logger log = Logger .getLogger("testAddHandler_NamedLoggerSufficientPrivilege"); @@ -832,12 +672,6 @@ public class LoggerTest extends TestCase { * Test addHandler(Handler) for a named logger with sufficient privilege, * add duplicate handlers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_NamedLoggerSufficientPrivilegeDuplicate() { Logger log = Logger .getLogger("testAddHandler_NamedLoggerSufficientPrivilegeDuplicate"); @@ -855,12 +689,6 @@ public class LoggerTest extends TestCase { /* * Test addHandler(Handler) with a null handler. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies NullPointerException.", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_Null() { Logger log = Logger.getLogger("testAddHandler_Null"); try { @@ -874,12 +702,6 @@ public class LoggerTest extends TestCase { /* * Test addHandler(Handler) for a named logger with insufficient privilege. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_NamedLoggerInsufficientPrivilege() { Logger log = Logger .getLogger("testAddHandler_NamedLoggerInsufficientPrivilege"); @@ -900,12 +722,6 @@ public class LoggerTest extends TestCase { * Test addHandler(Handler) for a named logger with insufficient privilege, * using a null handler. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_NamedLoggerInsufficientPrivilegeNull() { Logger log = Logger .getLogger("testAddHandler_NamedLoggerInsufficientPrivilege"); @@ -925,12 +741,6 @@ public class LoggerTest extends TestCase { * Test addHandler(Handler) for an anonymous logger with sufficient * privilege. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_AnonyLoggerSufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); MockHandler h = new MockHandler(); @@ -944,12 +754,6 @@ public class LoggerTest extends TestCase { * Test addHandler(Handler) for an anonymous logger with insufficient * privilege. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_AnonyLoggerInsufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); MockHandler h = new MockHandler(); @@ -969,12 +773,6 @@ public class LoggerTest extends TestCase { * Test addHandler(Handler) for a null-named mock logger with insufficient * privilege. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies addHandler(Handler) for a null-named mock logger with insufficient privilege, SecurityException.", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testAddHandler_NullNamedMockLoggerInsufficientPrivilege() { MockLogger mlog = new MockLogger(null, null); MockHandler h = new MockHandler(); @@ -993,12 +791,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for a named logger with sufficient privilege, * remove an existing handler. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "addHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_NamedLoggerSufficientPrivilege() { Logger log = Logger .getLogger("testRemoveHandler_NamedLoggerSufficientPrivilege"); @@ -1013,12 +805,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for a named logger with sufficient privilege, * remove a non-existing handler. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_NamedLoggerSufficientPrivilegeNotExisting() { Logger log = Logger .getLogger("testRemoveHandler_NamedLoggerSufficientPrivilegeNotExisting"); @@ -1031,12 +817,6 @@ public class LoggerTest extends TestCase { /* * Test removeHandler(Handler) with a null handler. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_Null() { Logger log = Logger.getLogger("testRemoveHandler_Null"); log.removeHandler(null); @@ -1047,12 +827,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for a named logger with insufficient * privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_NamedLoggerInsufficientPrivilege() { Logger log = Logger .getLogger("testRemoveHandler_NamedLoggerInsufficientPrivilege"); @@ -1073,12 +847,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for a named logger with insufficient * privilege, using a null handler. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_NamedLoggerInsufficientPrivilegeNull() { Logger log = Logger .getLogger("testRemoveHandler_NamedLoggerInsufficientPrivilege"); @@ -1098,12 +866,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for an anonymous logger with sufficient * privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_AnonyLoggerSufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); MockHandler h = new MockHandler(); @@ -1117,12 +879,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for an anonymous logger with insufficient * privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_AnonyLoggerInsufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); MockHandler h = new MockHandler(); @@ -1142,12 +898,6 @@ public class LoggerTest extends TestCase { * Test removeHandler(Handler) for a null-named mock logger with * insufficient privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "removeHandler", - args = {java.util.logging.Handler.class} - ) public void testRemoveHandler_NullNamedMockLoggerInsufficientPrivilege() { MockLogger mlog = new MockLogger(null, null); MockHandler h = new MockHandler(); @@ -1165,12 +915,6 @@ public class LoggerTest extends TestCase { /* * Test getHandlers() when there's no handler. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getHandlers() when there's no handler.", - method = "getHandlers", - args = {} - ) public void testGetHandlers_None() { Logger log = Logger.getLogger("testGetHandlers_None"); assertEquals(log.getHandlers().length, 0); @@ -1179,12 +923,6 @@ public class LoggerTest extends TestCase { /* * Test getHandlers() when there are several handlers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getHandlers() when there are several handlers.", - method = "getHandlers", - args = {} - ) public void testGetHandlers_Several() { Logger log = Logger.getLogger("testGetHandlers_None"); assertEquals(log.getHandlers().length, 0); @@ -1210,20 +948,6 @@ public class LoggerTest extends TestCase { * Test getFilter & setFilter with normal value for a named logger, having * sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getFilter & setFilter with normal value for a named logger, having sufficient privilege.", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getFilter & setFilter with normal value for a named logger, having sufficient privilege.", - method = "setFilter", - args = {java.util.logging.Filter.class} - ) - }) public void testGetSetFilter_NamedLoggerSufficientPrivilege() { Logger log = Logger .getLogger("testGetSetFilter_NamedLoggerSufficientPrivilege"); @@ -1237,20 +961,6 @@ public class LoggerTest extends TestCase { /* * Test getFilter & setFilter with null value, having sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getFilter & setFilter with null value, having sufficient privilege.", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getFilter & setFilter with null value, having sufficient privilege.", - method = "setFilter", - args = {java.util.logging.Filter.class} - ) - }) public void testGetSetFilter_Null() { Logger log = Logger.getLogger("testGetSetFilter_Null"); @@ -1266,20 +976,6 @@ public class LoggerTest extends TestCase { * Test setFilter with normal value for a named logger, having insufficient * privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies setFilter with normal value for a named logger, having insufficient privilege.", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies setFilter with normal value for a named logger, having insufficient privilege.", - method = "setFilter", - args = {java.util.logging.Filter.class} - ) - }) public void testGetSetFilter_NamedLoggerInsufficientPrivilege() { Logger log = Logger .getLogger("testGetSetFilter_NamedLoggerInsufficientPrivilege"); @@ -1298,20 +994,6 @@ public class LoggerTest extends TestCase { /* * Test setFilter for an anonymous logger with sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setFilter", - args = {java.util.logging.Filter.class} - ) - }) public void testSetFilter_AnonyLoggerSufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); Filter f = new MockFilter(); @@ -1323,20 +1005,6 @@ public class LoggerTest extends TestCase { /* * Test setFilter for an anonymous logger with insufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setFilter", - args = {java.util.logging.Filter.class} - ) - }) public void testSetFilter_AnonyLoggerInsufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); Filter f = new MockFilter(); @@ -1354,20 +1022,6 @@ public class LoggerTest extends TestCase { /* * Test setFilter for a null-named mock logger with insufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getFilter", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setFilter", - args = {java.util.logging.Filter.class} - ) - }) public void testSetFilter_NullNamedMockLoggerInsufficientPrivilege() { MockLogger mlog = new MockLogger(null, null); Filter f = new MockFilter(); @@ -1386,20 +1040,6 @@ public class LoggerTest extends TestCase { * Test getLevel & setLevel with normal value for a named logger, having * sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getLevel & setLevel with normal value for a named logger, having sufficient privilege.", - method = "setLevel", - args = {java.util.logging.Level.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getLevel & setLevel with normal value for a named logger, having sufficient privilege.", - method = "getLevel", - args = {} - ) - }) public void testGetSetLevel_NamedLoggerSufficientPrivilege() { Logger log = Logger .getLogger("testGetSetLevel_NamedLoggerSufficientPrivilege"); @@ -1412,20 +1052,6 @@ public class LoggerTest extends TestCase { /* * Test getLevel & setLevel with null value, having sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getLevel & setLevel with null value, having sufficient privilege.", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies getLevel & setLevel with null value, having sufficient privilege.", - method = "setLevel", - args = {java.util.logging.Level.class} - ) - }) public void testGetSetLevel_Null() { Logger log = Logger.getLogger("testGetSetLevel_Null"); @@ -1441,20 +1067,6 @@ public class LoggerTest extends TestCase { * Test setLevel with normal value for a named logger, having insufficient * privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies setLevel with normal value for a named logger, having insufficient privilege.", - method = "setLevel", - args = {java.util.logging.Level.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Verifies setLevel with normal value for a named logger, having insufficient privilege.", - method = "getLevel", - args = {} - ) - }) public void testGetSetLevel_NamedLoggerInsufficientPrivilege() { Logger log = Logger .getLogger("testGetSetLevel_NamedLoggerInsufficientPrivilege"); @@ -1472,20 +1084,6 @@ public class LoggerTest extends TestCase { /* * Test setLevel for an anonymous logger with sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setLevel", - args = {java.util.logging.Level.class} - ) - }) public void testSetLevel_AnonyLoggerSufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); assertNull(log.getLevel()); @@ -1496,20 +1094,6 @@ public class LoggerTest extends TestCase { /* * Test setLevel for an anonymous logger with insufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setLevel", - args = {java.util.logging.Level.class} - ) - }) public void testSetLevel_AnonyLoggerInsufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); SecurityManager oldMan = System.getSecurityManager(); @@ -1526,20 +1110,6 @@ public class LoggerTest extends TestCase { /* * Test setLevel for a null-named mock logger with insufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setLevel", - args = {java.util.logging.Level.class} - ) - }) public void testSetLevel_NullNamedMockLoggerInsufficientPrivilege() { MockLogger mlog = new MockLogger(null, null); SecurityManager oldMan = System.getSecurityManager(); @@ -1557,20 +1127,6 @@ public class LoggerTest extends TestCase { * Test getUseParentHandlers & setUseParentHandlers with normal value for a * named logger, having sufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getUseParentHandlers", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setUseParentHandlers", - args = {boolean.class} - ) - }) public void testGetSetUseParentHandlers_NamedLoggerSufficientPrivilege() { Logger log = Logger .getLogger("testGetSetUseParentHandlers_NamedLoggerSufficientPrivilege"); @@ -1584,20 +1140,6 @@ public class LoggerTest extends TestCase { * Test setUseParentHandlers with normal value for a named logger, having * insufficient privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getUseParentHandlers", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setUseParentHandlers", - args = {boolean.class} - ) - }) public void testGetSetUseParentHandlers_NamedLoggerInsufficientPrivilege() { Logger log = Logger .getLogger("testGetSetUseParentHandlers_NamedLoggerInsufficientPrivilege"); @@ -1616,20 +1158,6 @@ public class LoggerTest extends TestCase { * Test setUseParentHandlers for an anonymous logger with sufficient * privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getUseParentHandlers", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setUseParentHandlers", - args = {boolean.class} - ) - }) public void testSetUseParentHandlers_AnonyLoggerSufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); assertTrue(log.getUseParentHandlers()); @@ -1641,20 +1169,6 @@ public class LoggerTest extends TestCase { * Test setUseParentHandlers for an anonymous logger with insufficient * privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getUseParentHandlers", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setUseParentHandlers", - args = {boolean.class} - ) - }) public void testSetUseParentHandlers_AnonyLoggerInsufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); SecurityManager oldMan = System.getSecurityManager(); @@ -1672,20 +1186,6 @@ public class LoggerTest extends TestCase { * Test setUseParentHandlers for a null-named mock logger with insufficient * privilege. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getUseParentHandlers", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setUseParentHandlers", - args = {boolean.class} - ) - }) public void testSetUseParentHandlers_NullNamedMockLoggerInsufficientPrivilege() { MockLogger mlog = new MockLogger(null, null); SecurityManager oldMan = System.getSecurityManager(); @@ -1702,12 +1202,6 @@ public class LoggerTest extends TestCase { /* * Test getParent() for root logger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getParent() for root logger.", - method = "getParent", - args = {} - ) public void testGetParent_Root() { assertNull(Logger.getLogger("").getParent()); } @@ -1715,12 +1209,6 @@ public class LoggerTest extends TestCase { /* * Test getParent() for normal named loggers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getParent() for normal named loggers.", - method = "getParent", - args = {} - ) public void testGetParent_NormalNamed() { Logger log = Logger.getLogger("testGetParent_NormalNamed"); assertSame(log.getParent(), Logger.getLogger("")); @@ -1733,12 +1221,6 @@ public class LoggerTest extends TestCase { /* * Test getParent() for anonymous loggers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getParent() for anonymous loggers.", - method = "getParent", - args = {} - ) public void testGetParent_Anonymous() { assertSame(Logger.getAnonymousLogger().getParent(), Logger .getLogger("")); @@ -1748,12 +1230,6 @@ public class LoggerTest extends TestCase { * Test setParent(Logger) for the mock logger since it is advised not to * call this method on named loggers. Test normal conditions. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setParent", - args = {java.util.logging.Logger.class} - ) public void testSetParent_Normal() { Logger log = new MockLogger(null, null); Logger parent = new MockLogger(null, null); @@ -1765,12 +1241,6 @@ public class LoggerTest extends TestCase { /* * Test setParent(Logger) with null. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setParent", - args = {java.util.logging.Logger.class} - ) public void testSetParent_Null() { try { (new MockLogger(null, null)).setParent(null); @@ -1782,12 +1252,6 @@ public class LoggerTest extends TestCase { /* * Test setParent(Logger), having insufficient privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setParent", - args = {java.util.logging.Logger.class} - ) public void testSetParent_InsufficientPrivilege() { MockLogger log = new MockLogger(null, null); SecurityManager oldMan = System.getSecurityManager(); @@ -1804,12 +1268,6 @@ public class LoggerTest extends TestCase { /* * Test setParent(Logger) with null, having insufficient privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setParent", - args = {java.util.logging.Logger.class} - ) public void testSetParent_InsufficientPrivilegeNull() { MockLogger log = new MockLogger(null, null); SecurityManager oldMan = System.getSecurityManager(); @@ -1827,12 +1285,6 @@ public class LoggerTest extends TestCase { * Test setParent(Logger) for an anonymous logger with insufficient * privilege. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setParent", - args = {java.util.logging.Logger.class} - ) public void testSetParent_AnonyLoggerInsufficientPrivilege() { Logger log = Logger.getAnonymousLogger(); SecurityManager oldMan = System.getSecurityManager(); @@ -1849,12 +1301,6 @@ public class LoggerTest extends TestCase { /* * Test getName() for normal names. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getName() for normal names.", - method = "getName", - args = {} - ) public void testGetName_Normal() { Logger log = Logger.getLogger("testGetName_Normal"); assertEquals("testGetName_Normal", log.getName()); @@ -1866,12 +1312,6 @@ public class LoggerTest extends TestCase { /* * Test getName() for empty name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getName() for empty name.", - method = "getName", - args = {} - ) public void testGetName_Empty() { Logger log = Logger.getLogger(""); assertEquals("", log.getName()); @@ -1883,12 +1323,6 @@ public class LoggerTest extends TestCase { /* * Test getName() for null name. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getName() for null name.", - method = "getName", - args = {} - ) public void testGetName_Null() { Logger log = Logger.getAnonymousLogger(); assertNull(log.getName()); @@ -1900,12 +1334,6 @@ public class LoggerTest extends TestCase { /* * Test getResourceBundle() when it it not null. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getResourceBundle() when it it not null.", - method = "getResourceBundle", - args = {} - ) public void testGetResourceBundle_Normal() { Logger log = Logger.getLogger("testGetResourceBundle_Normal", VALID_RESOURCE_BUNDLE); @@ -1918,12 +1346,6 @@ public class LoggerTest extends TestCase { /* * Test getResourceBundle() when it it null. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getResourceBundle() when it it null.", - method = "getResourceBundle", - args = {} - ) public void testGetResourceBundle_Null() { Logger log = Logger.getLogger("testGetResourceBundle_Null", null); assertNull(log.getResourceBundle()); @@ -1936,12 +1358,6 @@ public class LoggerTest extends TestCase { /* * Test getResourceBundleName() when it it not null. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getResourceBundleName() when it it not null.", - method = "getResourceBundleName", - args = {} - ) public void testGetResourceBundleName_Normal() { Logger log = Logger.getLogger("testGetResourceBundleName_Normal", VALID_RESOURCE_BUNDLE); @@ -1954,12 +1370,6 @@ public class LoggerTest extends TestCase { /* * Test getResourceBundleName() when it it null. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies getResourceBundleName() when it it null.", - method = "getResourceBundleName", - args = {} - ) public void testGetResourceBundleName_Null() { Logger log = Logger.getLogger("testGetResourceBundleName_Null", null); assertNull(log.getResourceBundleName()); @@ -1972,12 +1382,6 @@ public class LoggerTest extends TestCase { /* * Test isLoggable(Level). */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "isLoggable", - args = {java.util.logging.Level.class} - ) public void testIsLoggable() { MockLogger mlog = new MockLogger(null, null); assertNull(mlog.getLevel()); @@ -2011,12 +1415,6 @@ public class LoggerTest extends TestCase { /* * Test throwing(String, String, Throwable) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "throwing", - args = {java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testThrowing_Normal() { Throwable t = new Throwable(); this.sharedLogger.setLevel(Level.FINER); @@ -2045,12 +1443,6 @@ public class LoggerTest extends TestCase { /* * Test throwing(String, String, Throwable) with null values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "throwing", - args = {java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testThrowing_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2075,12 +1467,6 @@ public class LoggerTest extends TestCase { /* * Test entering(String, String) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String) with normal values.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class} - ) public void testEntering_StringString_Normal() { this.sharedLogger.setLevel(Level.FINER); this.sharedLogger.entering("sourceClass", "sourceMethod"); @@ -2105,12 +1491,6 @@ public class LoggerTest extends TestCase { /* * Test entering(String, String) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String) with null values.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class} - ) public void testEntering_StringString_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2135,12 +1515,6 @@ public class LoggerTest extends TestCase { /* * Test entering(String, String, Object) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String, Object) with normal values.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testEntering_StringStringObject_Normal() { Object param = new Object(); this.sharedLogger.setLevel(Level.FINER); @@ -2167,12 +1541,6 @@ public class LoggerTest extends TestCase { /* * Test entering(String, String, Object) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String, Object) with null values.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testEntering_StringStringObject_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2198,12 +1566,6 @@ public class LoggerTest extends TestCase { /* * Test entering(String, String, Object[]) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String, Object[]) with normal values.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testEntering_StringStringObjects_Normal() { Object[] params = new Object[2]; params[0] = new Object(); @@ -2234,12 +1596,6 @@ public class LoggerTest extends TestCase { * Test entering(String, String, Object[]) with null class name and method * name and empty parameter array. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String, Object[]) with null class name and method name and empty parameter array.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testEntering_StringStringObjects_NullEmpty() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2265,12 +1621,6 @@ public class LoggerTest extends TestCase { * Test entering(String, String, Object[]) with null values with appropriate * logging level set. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String, Object[]) with null values with appropriate logging level set.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testEntering_StringStringObjects_Null() { sharedLogger.setLevel(Level.FINER); sharedLogger.entering(null, null, (Object[]) null); @@ -2293,12 +1643,6 @@ public class LoggerTest extends TestCase { * Test entering(String, String, Object[]) with null values with * inappropriate logging level set. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies entering(String, String, Object[]) with null values with inappropriate logging level set.", - method = "entering", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testEntering_StringStringObjects_NullDisabled() { this.sharedLogger.setLevel(Level.FINE); this.sharedLogger.entering(null, null, (Object[]) null); @@ -2308,12 +1652,6 @@ public class LoggerTest extends TestCase { /* * Test exiting(String, String) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies exiting(String, String) with normal values.", - method = "exiting", - args = {java.lang.String.class, java.lang.String.class} - ) public void testExiting_StringString_Normal() { this.sharedLogger.setLevel(Level.FINER); this.sharedLogger.exiting("sourceClass", "sourceMethod"); @@ -2338,12 +1676,6 @@ public class LoggerTest extends TestCase { /* * Test exiting(String, String) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies exiting(String, String) with null values.", - method = "exiting", - args = {java.lang.String.class, java.lang.String.class} - ) public void testExiting_StringString_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2368,12 +1700,6 @@ public class LoggerTest extends TestCase { /* * Test exiting(String, String, Object) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies exiting(String, String, Object) with normal values.", - method = "exiting", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testExiting_StringStringObject_Normal() { Object param = new Object(); this.sharedLogger.setLevel(Level.FINER); @@ -2400,12 +1726,6 @@ public class LoggerTest extends TestCase { /* * Test exiting(String, String, Object) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies exiting(String, String, Object) with null values.", - method = "exiting", - args = {java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testExiting_StringStringObject_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2431,12 +1751,6 @@ public class LoggerTest extends TestCase { /* * Test config(String) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "config", - args = {java.lang.String.class} - ) public void testConfig_Normal() { this.sharedLogger.setLevel(Level.CONFIG); this.sharedLogger.config("config msg"); @@ -2461,12 +1775,6 @@ public class LoggerTest extends TestCase { /* * Test config(String) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies null as a parameter.", - method = "config", - args = {java.lang.String.class} - ) public void testConfig_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2495,12 +1803,6 @@ public class LoggerTest extends TestCase { /* * Test fine(String) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "fine", - args = {java.lang.String.class} - ) public void testFine_Normal() { this.sharedLogger.setLevel(Level.FINE); this.sharedLogger.fine("fine msg"); @@ -2525,12 +1827,6 @@ public class LoggerTest extends TestCase { /* * Test fine(String) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies fine(String) with null values.", - method = "fine", - args = {java.lang.String.class} - ) public void testFine_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2559,12 +1855,6 @@ public class LoggerTest extends TestCase { /* * Test finer(String) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies finer(String) with normal values.", - method = "finer", - args = {java.lang.String.class} - ) public void testFiner_Normal() { this.sharedLogger.setLevel(Level.FINER); this.sharedLogger.finer("finer msg"); @@ -2589,12 +1879,6 @@ public class LoggerTest extends TestCase { /* * Test finer(String) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies finer(String) with null values.", - method = "finer", - args = {java.lang.String.class} - ) public void testFiner_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2623,12 +1907,6 @@ public class LoggerTest extends TestCase { /* * Test finest(String) with normal values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies finest(String) with normal values.", - method = "finest", - args = {java.lang.String.class} - ) public void testFinest_Normal() { this.sharedLogger.setLevel(Level.FINEST); this.sharedLogger.finest("finest msg"); @@ -2653,12 +1931,6 @@ public class LoggerTest extends TestCase { /* * Test finest(String) with null values. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies finest(String) with null values.", - method = "finest", - args = {java.lang.String.class} - ) public void testFinest_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2687,12 +1959,6 @@ public class LoggerTest extends TestCase { /* * Test info(String) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "info", - args = {java.lang.String.class} - ) public void testInfo_Normal() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.info("info msg"); @@ -2717,12 +1983,6 @@ public class LoggerTest extends TestCase { /* * Test info(String) with null values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "info", - args = {java.lang.String.class} - ) public void testInfo_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2751,12 +2011,6 @@ public class LoggerTest extends TestCase { /* * Test warning(String) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "warning", - args = {java.lang.String.class} - ) public void testWarning_Normal() { this.sharedLogger.setLevel(Level.WARNING); this.sharedLogger.warning("warning msg"); @@ -2781,12 +2035,6 @@ public class LoggerTest extends TestCase { /* * Test warning(String) with null values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "warning", - args = {java.lang.String.class} - ) public void testWarning_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2815,12 +2063,6 @@ public class LoggerTest extends TestCase { /* * Test severe(String) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "severe", - args = {java.lang.String.class} - ) public void testSevere_Normal() { this.sharedLogger.setLevel(Level.SEVERE); this.sharedLogger.severe("severe msg"); @@ -2845,12 +2087,6 @@ public class LoggerTest extends TestCase { /* * Test severe(String) with null values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "severe", - args = {java.lang.String.class} - ) public void testSevere_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2879,12 +2115,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class} - ) public void testLog_LevelString_Normal() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.log(Level.INFO, "log(Level, String) msg"); @@ -2911,12 +2141,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String) with null message. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class} - ) public void testLog_LevelString_NullMsg() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -2941,12 +2165,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class} - ) public void testLog_LevelString_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -2959,12 +2177,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Object) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Object.class} - ) public void testLog_LevelStringObject_Normal() { Object param = new Object(); this.sharedLogger.setLevel(Level.INFO); @@ -2996,12 +2208,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Object) with null message and object. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Object.class} - ) public void testLog_LevelStringObject_NullMsgObj() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3027,12 +2233,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Object) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Object.class} - ) public void testLog_LevelStringObject_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3046,12 +2246,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Object[]) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLog_LevelStringObjects_Normal() { Object[] params = new Object[2]; @@ -3087,12 +2281,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Object[]) with null message and object. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLog_LevelStringObjects_NullMsgObj() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3117,12 +2305,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Object[]) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLog_LevelStringObjects_NullLevel() { try { this.sharedLogger.log(null, "log(Level, String, Object[]) msg", @@ -3135,12 +2317,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Throwable) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLog_LevelStringThrowable_Normal() { Throwable t = new Throwable(); this.sharedLogger.setLevel(Level.INFO); @@ -3171,12 +2347,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Throwable) with null message and throwable. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLog_LevelStringThrowable_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3201,12 +2371,6 @@ public class LoggerTest extends TestCase { /* * Test log(Level, String, Throwable) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLog_LevelStringThrowable_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3220,12 +2384,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogp_LevelStringStringString_Normal() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.logp(Level.INFO, "sourceClass", "sourceMethod", @@ -3255,12 +2413,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String) with null message. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogp_LevelStringStringString_NullMsg() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3285,12 +2437,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogp_LevelStringStringString_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3304,12 +2450,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String, Object) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testLogp_LevelStringStringStringObject_Normal() { Object param = new Object(); this.sharedLogger.setLevel(Level.INFO); @@ -3343,12 +2483,6 @@ public class LoggerTest extends TestCase { * Test logp(Level, String, String, String, Object) with null message and * object. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testLogp_LevelStringStringStringObject_NullMsgObj() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3374,13 +2508,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String, Object) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) - public void testLogp_LevelStringStringStringObject_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3395,13 +2522,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String, Object[]) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) - public void testLogp_LevelStringStringStringObjects_Normal() { Object[] params = new Object[2]; params[0] = new Object(); @@ -3438,12 +2558,6 @@ public class LoggerTest extends TestCase { * Test logp(Level, String, String, String, Object[]) with null message and * object. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLogp_LevelStringStringStringObjects_NullMsgObj() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3468,12 +2582,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String, Object[]) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLogp_LevelStringStringStringObjects_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3488,12 +2596,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String, Throwable) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogp_LevelStringStringStringThrowable_Normal() { Throwable t = new Throwable(); this.sharedLogger.setLevel(Level.INFO); @@ -3526,12 +2628,6 @@ public class LoggerTest extends TestCase { * Test logp(Level, String, String, String, Throwable) with null message and * throwable. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogp_LevelStringStringStringThrowable_Null() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -3556,12 +2652,6 @@ public class LoggerTest extends TestCase { /* * Test logp(Level, String, String, String, Throwable) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logp", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogp_LevelStringStringStringThrowable_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3576,12 +2666,6 @@ public class LoggerTest extends TestCase { /* * Test logrb(Level, String, String, String, String) with normal values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogrb_LevelStringStringString_Normal() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.logrb(Level.INFO, "sourceClass", "sourceMethod", @@ -3614,12 +2698,6 @@ public class LoggerTest extends TestCase { /* * Test logrb(Level, String, String, String, String) with null message. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogrb_LevelStringStringString_NullMsg() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.logrb(Level.INFO, null, null, null, null); @@ -3638,12 +2716,6 @@ public class LoggerTest extends TestCase { /* * Test logrb(Level, String, String, String) with null level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogrb_LevelStringStringString_NullLevel() { try { this.sharedLogger.logrb(null, "sourceClass", "sourceMethod", @@ -3658,12 +2730,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String) with invalid resource * bundle. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void testLogrb_LevelStringStringString_InvalidRes() { this.sharedLogger.setLevel(Level.ALL); this.sharedLogger.logrb(Level.ALL, "sourceClass", "sourceMethod", @@ -3687,12 +2753,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object) with normal * values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testLogrb_LevelStringStringStringObject_Normal() { Object param = new Object(); this.sharedLogger.setLevel(Level.INFO); @@ -3730,12 +2790,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object) with null * message and object. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testLogrb_LevelStringStringStringObject_NullMsgObj() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.logrb(Level.INFO, null, null, null, null, @@ -3757,12 +2811,6 @@ public class LoggerTest extends TestCase { * java.util.logging.Logger#logrb(Level, String, String, String, String, * Object) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Regression test.", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class} - ) public void test_logrbLLevel_LString_LString_LObject_Security() throws Exception { // regression test for Harmony-1290 @@ -3779,12 +2827,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object) with null * level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testLogrb_LevelStringStringStringObject_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -3801,12 +2843,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object) with invalid * resource bundle. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object.class} - ) public void testLogrb_LevelStringStringStringObject_InvalidRes() { Object param = new Object(); this.sharedLogger.setLevel(Level.ALL); @@ -3831,13 +2867,7 @@ public class LoggerTest extends TestCase { /* * Test logrb(Level, String, String, String, String, Object[]) with normal * values. - */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) + */ public void testLogrb_LevelStringStringStringObjects_Normal() { Object[] params = new Object[2]; params[0] = new Object(); @@ -3878,12 +2908,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object[]) with null * message and object. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLogrb_LevelStringStringStringObjects_NullMsgObj() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.logrb(Level.INFO, null, null, null, null, @@ -3904,12 +2928,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object[]) with null * level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLogrb_LevelStringStringStringObjects_NullLevel() { try { this.sharedLogger.logrb( @@ -3928,12 +2946,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Object[]) with invalid * resource bundle. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Object[].class} - ) public void testLogrb_LevelStringStringStringObjects_InvalidRes() { Object[] params = new Object[2]; params[0] = new Object(); @@ -3962,12 +2974,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Throwable) with normal * values. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogrb_LevelStringStringStringThrowable_Normal() { Throwable t = new Throwable(); this.sharedLogger.setLevel(Level.INFO); @@ -4005,12 +3011,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Throwable) with null * message and throwable. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogrb_LevelStringTStringStringhrowable_NullMsgObj() { this.sharedLogger.setLevel(Level.INFO); this.sharedLogger.logrb(Level.INFO, null, null, null, null, @@ -4031,12 +3031,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Throwable) with null * level. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogrb_LevelStringStringStringThrowable_NullLevel() { // this.sharedLogger.setLevel(Level.OFF); try { @@ -4056,12 +3050,6 @@ public class LoggerTest extends TestCase { * Test logrb(Level, String, String, String, String, Throwable) with invalid * resource bundle. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "logrb", - args = {java.util.logging.Level.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Throwable.class} - ) public void testLogrb_LevelStringStringStringThrowable_InvalidRes() { Throwable t = new Throwable(); this.sharedLogger.setLevel(Level.ALL); @@ -4086,12 +3074,6 @@ public class LoggerTest extends TestCase { * Test log(LogRecord) for a normal log record. Meanwhile the logger has an * appropriate level, no filter, no parent. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_LogRecord_AppropriateLevelNoFilterNoParent() { LogRecord r = new LogRecord(Level.INFO, "testLog_LogRecord_AppropriateLevelNoFilterNoParent"); @@ -4115,12 +3097,6 @@ public class LoggerTest extends TestCase { /* * Test log(LogRecord) with null log record. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_LogRecord_Null() { this.sharedLogger.setLevel(Level.INFO); try { @@ -4134,12 +3110,6 @@ public class LoggerTest extends TestCase { * Test log(LogRecord) for a normal log record. Meanwhile the logger has an * inappropriate level, no filter, no parent. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_LogRecord_InppropriateLevelNoFilterNoParent() { LogRecord r = new LogRecord(Level.INFO, "testLog_LogRecord_InppropriateLevelNoFilterNoParent"); @@ -4158,12 +3128,6 @@ public class LoggerTest extends TestCase { * Test log(LogRecord) for a normal log record. Meanwhile the logger has an * appropriate level, a filter that accepts the fed log record, no parent. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_LogRecord_AppropriateLevelTrueFilterNoParent() { LogRecord r = new LogRecord(Level.INFO, "testLog_LogRecord_AppropriateLevelTrueFilterNoParent"); @@ -4192,12 +3156,6 @@ public class LoggerTest extends TestCase { * Test log(LogRecord) for a normal log record. Meanwhile the logger has an * appropriate level, a filter that rejects the fed log record, no parent. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_LogRecord_AppropriateLevelFalseFilterNoParent() { LogRecord r = new LogRecord(Level.INFO, "testLog_LogRecord_AppropriateLevelFalseFilterNoParent"); @@ -4225,12 +3183,6 @@ public class LoggerTest extends TestCase { * Test that the parent's handler is notified for a new log record when * getUseParentHandlers() is true. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_ParentInformed() { Logger child = new MockLogger("childLogger", VALID_RESOURCE_BUNDLE); Logger parent = new MockParentLogger("parentLogger", @@ -4283,12 +3235,6 @@ public class LoggerTest extends TestCase { * Test that the ancestor's handler is notified for a new log record when * getUseParentHandlers() is true. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_AncestorInformed() { Logger child = new MockLogger("childLogger", VALID_RESOURCE_BUNDLE); Logger parent = new MockParentLogger("parentLogger", @@ -4335,12 +3281,6 @@ public class LoggerTest extends TestCase { * Test that the parent's handler is notified for a new log record when * getUseParentHandlers() is false. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_ParentNotInformed() { Logger child = new MockLogger("childLogger", VALID_RESOURCE_BUNDLE); Logger parent = new MockParentLogger("parentLogger", @@ -4361,12 +3301,6 @@ public class LoggerTest extends TestCase { * Test that a logger with null level and no parent. Defaulted to * Level.INFO. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_NullLevelNoParent() { LogRecord r = new LogRecord(Level.INFO, "testLog_NullLevelNoParent"); assertNull(this.sharedLogger.getLevel()); @@ -4392,12 +3326,6 @@ public class LoggerTest extends TestCase { /* * Test that a logger inherits its parent level when its level is null. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_NullLevelHasParent() { Logger child = new MockLogger("childLogger", VALID_RESOURCE_BUNDLE); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -4450,12 +3378,6 @@ public class LoggerTest extends TestCase { * Test that a logger with null resource bundle and no parent. Defaulted to * null. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_NullResNoParent() { Logger log = new MockLogger("Logger", null); log.addHandler(new MockHandler()); @@ -4477,12 +3399,6 @@ public class LoggerTest extends TestCase { * Test that a logger inherits its parent resource bundle when its resource * bundle is null. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_NullResHasParent() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", VALID_RESOURCE_BUNDLE2); @@ -4513,12 +3429,6 @@ public class LoggerTest extends TestCase { * Test that a logger inherits its ancestor's resource bundle when its * resource bundle and its parent's resource bundle are both null. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_NullResHasAncestor() { Logger child = new MockLogger("childLogger", null); Logger parent = new MockLogger("parentLogger", null); @@ -4551,12 +3461,6 @@ public class LoggerTest extends TestCase { /* * Test when one handler throws an exception. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "log", - args = {java.util.logging.LogRecord.class} - ) public void testLog_ExceptionalHandler() { MockLogger l = new MockLogger("testLog_ExceptionalHandler", null); l.addHandler(new MockExceptionalHandler()); @@ -4572,12 +3476,6 @@ public class LoggerTest extends TestCase { /* * Test whether privileged code is used to load resource bundles. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getAnonymousLogger", - args = {java.lang.String.class} - ) public void testLoadResourceBundle() { // SecurityManager oldMan = System.getSecurityManager(); @@ -4594,12 +3492,6 @@ public class LoggerTest extends TestCase { * java.util.logging.Logger#logrb(Level, String, String, String, String, * Object) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getLogger", - args = {java.lang.String.class} - ) public void test_init_logger() throws Exception { Properties p = new Properties(); p.put("testGetLogger_Normal_ANewLogger2.level", "ALL"); @@ -4633,12 +3525,6 @@ public class LoggerTest extends TestCase { /* * test initHandler */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "initHandler", - args = {} - ) public void test_initHandler() throws Exception { File logProps = new File(LOGGING_CONFIG_FILE); LogManager lm = LogManager.getLogManager(); diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggingMXBeanTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggingMXBeanTest.java index c9b7d50..36cfb33 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggingMXBeanTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LoggingMXBeanTest.java @@ -16,11 +16,6 @@ */ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestLevel; - import junit.framework.TestCase; import tests.util.CallVerificationStack; @@ -31,7 +26,6 @@ import java.util.logging.LoggingMXBean; * This testcase verifies the signature of the interface Filter. * */ -@TestTargetClass(LoggingMXBean.class) public class LoggingMXBeanTest extends TestCase { private MockLoggingMXBean m = null; @@ -53,43 +47,19 @@ public class LoggingMXBeanTest extends TestCase { - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLoggerLevel", - args = {java.lang.String.class} - ) public void testGetLoggerLevel() { assertNull(m.getLoggerLevel(null)); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getLoggerNames", - args = {} - ) public void testGetLoggerNames() { assertNull(m.getLoggerNames()); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getParentLoggerName", - args = {java.lang.String.class} - ) public void testGetParentLoggerName() { assertNull(m.getParentLoggerName(null)); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setLoggerLevel", - args = {java.lang.String.class, java.lang.String.class} - ) public void testSetLoggerLevel() { try{ m.setLoggerLevel(null,null); diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java index 9aa344a..89629c7 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java @@ -17,11 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; @@ -47,7 +42,6 @@ import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper /** * */ -@TestTargetClass(MemoryHandler.class) public class MemoryHandlerTest extends TestCase { final static LogManager manager = LogManager.getLogManager(); @@ -107,50 +101,6 @@ public class MemoryHandlerTest extends TestCase { System.setErr(err); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "close", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "setPushLevel", - args = {java.util.logging.Level.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "flush", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "push", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "getPushLevel", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "isLoggable", - args = {java.util.logging.LogRecord.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "SecurityException", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) - }) public void testGlobalSecurity() { SecurityManager currentManager = System.getSecurityManager(); System.setSecurityManager(securityManager); @@ -176,12 +126,6 @@ public class MemoryHandlerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "close", - args = {} - ) public void testClose() { Filter filter = handler.getFilter(); Formatter formatter = handler.getFormatter(); @@ -197,12 +141,6 @@ public class MemoryHandlerTest extends TestCase { assertFalse(handler.isLoggable(new LogRecord(Level.SEVERE, "test"))); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "flush", - args = {} - ) public void testFlush() { Filter filter = handler.getFilter(); Formatter formatter = handler.getFormatter(); @@ -218,12 +156,6 @@ public class MemoryHandlerTest extends TestCase { assertTrue(handler.isLoggable(new LogRecord(Level.SEVERE, "test"))); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "isLoggable", - args = {java.util.logging.LogRecord.class} - ) public void testIsLoggable() { try { handler.isLoggable(null); @@ -255,12 +187,6 @@ public class MemoryHandlerTest extends TestCase { /* * Class under test for void MemoryHandler() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "check errors", - method = "MemoryHandler", - args = {} - ) public void testMemoryHandler() throws IOException { assertNotNull("Filter should not be null", handler.getFilter()); assertNotNull("Formatter should not be null", handler.getFormatter()); @@ -287,12 +213,6 @@ public class MemoryHandlerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "MemoryHandler", - args = {} - ) public void testMemoryHandlerInvalidProps() throws IOException { // null target try { @@ -360,12 +280,6 @@ public class MemoryHandlerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "MemoryHandler", - args = {} - ) public void testMemoryHandlerDefaultValue() throws SecurityException, IOException { props.clear(); @@ -386,12 +300,6 @@ public class MemoryHandlerTest extends TestCase { /* * Class under test for void MemoryHandler(Handler, int, Level) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "MemoryHandler", - args = {java.util.logging.Handler.class, int.class, java.util.logging.Level.class} - ) public void testMemoryHandlerHandlerintLevel() { handler = new MemoryHandler(target, 2, Level.FINEST); assertNotNull("Filter should not be null", handler.getFilter()); @@ -426,12 +334,6 @@ public class MemoryHandlerTest extends TestCase { } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getPushLevel", - args = {} - ) public void testGetPushLevel() { try { handler.setPushLevel(null); @@ -442,12 +344,6 @@ public class MemoryHandlerTest extends TestCase { assertEquals(handler.getPushLevel(), Level.parse("123")); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setPushLevel", - args = {java.util.logging.Level.class} - ) public void testSetPushLevel() { // change push level don't trigger push action writer.getBuffer().setLength(0); @@ -462,12 +358,6 @@ public class MemoryHandlerTest extends TestCase { assertEquals(writer.toString(), lr.getMessage() + lr.getMessage()); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "push", - args = {} - ) public void testPushPublic() { writer.getBuffer().setLength(0); // loggable but don't trig push diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MessagesTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MessagesTest.java index 74edbcb..e045a4b 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MessagesTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MessagesTest.java @@ -26,15 +26,9 @@ import java.io.OutputStream; import java.io.PrintStream; import java.util.logging.ErrorManager; -import dalvik.annotation.AndroidOnly; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; -@TestTargetClass(Messages.class) public class MessagesTest extends TestCase{ @@ -51,68 +45,26 @@ public class MessagesTest extends TestCase{ } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Just check signature, cannot make use of mock, method depend on luni", - method = "getString", - args = {java.lang.String.class} - ) - @AndroidOnly("harmony specific") public void testGetString_String() { m.getString(new String()); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Juste check signature, cannot make use of mock, depend on luni", - method = "getString", - args = {java.lang.String.class, java.lang.Object.class} - ) - @AndroidOnly("harmony specific") public void testGetString_StringObject() { m.getString(new String(), new Object()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Juste check signature, cannot make use of mock, depend on luni", - method = "getString", - args = {java.lang.String.class, int.class} - ) - @AndroidOnly("harmony specific") public void testGetString_StringInt() { m.getString(new String(), 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Juste check signature, cannot make use of mock, depend on luni", - method = "getString", - args = {java.lang.String.class, char.class} - ) - @AndroidOnly("harmony specific") public void testGetString_StringChar() { m.getString(new String(), 'a'); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Juste check signature, cannot make use of mock, depend on luni", - method = "getString", - args = {java.lang.String.class, java.lang.Object.class, java.lang.Object.class} - ) - @AndroidOnly("harmony specific") public void testGetString_StringObjectObject() { m.getString(new String(), new Object(), new Object() ); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Juste check signature, cannot make use of mock, depend on luni", - method = "getString", - args = {java.lang.String.class, java.lang.Object[].class} - ) - @AndroidOnly("harmony specific") public void testGetString_StringObjectArray() { m.getString(new String(), new Object[1]); } diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java index 79e37e8..16d051d 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java @@ -17,11 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.util.Calendar; import java.util.ResourceBundle; import java.util.logging.Handler; @@ -35,7 +30,6 @@ import junit.framework.TestCase; /** * */ -@TestTargetClass(SimpleFormatter.class) public class SimpleFormatterTest extends TestCase { SimpleFormatter sf; @@ -56,38 +50,12 @@ public class SimpleFormatterTest extends TestCase { /* * test for constructor protected SimpleFormatter */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "SimpleFormatter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getHead", - args = {java.util.logging.Handler.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getTail", - args = {java.util.logging.Handler.class} - ) - }) public void testSimpleFormatter() { assertEquals("Head for this SimpleFormatter should be empty", "", sf .getHead(null)); assertEquals("Tail for this SimpleFormatter should be empty", "", sf .getTail(null)); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ) public void testFormatNull() { try { sf.format(null); @@ -97,12 +65,6 @@ public class SimpleFormatterTest extends TestCase { sf.format(new LogRecord(Level.SEVERE, null)); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ) public void testLocalizedFormat() { // if bundle set, should use localized message ResourceBundle rb = ResourceBundle @@ -122,12 +84,6 @@ public class SimpleFormatterTest extends TestCase { assertTrue(str.indexOf(localeMsg) < 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ) public void testFormat() { String str = sf.format(lr); Throwable t; @@ -159,22 +115,10 @@ public class SimpleFormatterTest extends TestCase { assertTrue(str.indexOf(Level.FINE.getLocalizedName()) > 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getHead", - args = {java.util.logging.Handler.class} - ) public void testGetHead() { assertEquals("", sf.getHead(null)); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getTail", - args = {java.util.logging.Handler.class} - ) public void testGetTail() { assertEquals("", sf.getTail(null)); } diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java index cc3b165..bbf30b0 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java @@ -17,11 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStreamReader; @@ -52,7 +47,6 @@ import tests.util.CallVerificationStack; /** * Test class java.util.logging.ConsoleHandler */ -@TestTargetClass(SocketHandler.class) public class SocketHandlerTest extends TestCase { private static final LogManager LOG_MANAGER = LogManager.getLogManager(); @@ -116,20 +110,6 @@ public class SocketHandlerTest extends TestCase { /* * Test the constructor with no relevant log manager properties are set. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with no relevant log manager properties are set.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with no relevant log manager properties are set.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_NoProperties() throws Exception { assertNull(LOG_MANAGER.getProperty( "java.util.logging.SocketHandler.level")); @@ -205,20 +185,6 @@ public class SocketHandlerTest extends TestCase { * Test the constructor with no relevant log manager properties are set * except host and port. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with no relevant log manager properties are set except host and port.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with no relevant log manager properties are set except host and port.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_NoBasicProperties() throws Exception { assertNull(LOG_MANAGER.getProperty( "java.util.logging.SocketHandler.level")); @@ -258,20 +224,6 @@ public class SocketHandlerTest extends TestCase { /* * Test the constructor with insufficient privilege for connection. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies SecurityException.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_InsufficientPrivilege() throws Exception { SecurityManager oldMan = null; Properties p = new Properties(); @@ -308,20 +260,6 @@ public class SocketHandlerTest extends TestCase { /* * Test the constructor with valid relevant log manager properties are set. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with valid relevant log manager properties are set.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with valid relevant log manager properties are set.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_ValidProperties() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.level", "FINE"); @@ -368,20 +306,6 @@ public class SocketHandlerTest extends TestCase { * Test the constructor with invalid relevant log manager properties are set * except host and port. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with invalid relevant log manager properties are set except host and port.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies the constructor with invalid relevant log manager properties are set except host and port.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_InvalidBasicProperties() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.level", INVALID_LEVEL); @@ -430,12 +354,6 @@ public class SocketHandlerTest extends TestCase { * Test the constructor with valid relevant log manager properties are set * except port. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IllegalArgumentException.", - method = "SocketHandler", - args = {} - ) public void testConstructor_InvalidPort() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.level", "FINE"); @@ -461,20 +379,6 @@ public class SocketHandlerTest extends TestCase { * Test the constructor with valid relevant log manager properties are set, * but the port is not open. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies that the constructor with valid relevant log manager properties are set, but the port is not open.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies that the constructor with valid relevant log manager properties are set, but the port is not open.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_NotOpenPort() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.level", "FINE"); @@ -507,20 +411,6 @@ public class SocketHandlerTest extends TestCase { * Test the constructor with valid relevant log manager properties are set * except port. */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IOException.", - method = "SocketHandler", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies IOException.", - method = "SocketHandler", - args = {java.lang.String.class, int.class} - ) - }) public void testConstructor_InvalidHost() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.level", "FINE"); @@ -553,12 +443,6 @@ public class SocketHandlerTest extends TestCase { * Test close() when having sufficient privilege, and a record has been * written to the output stream. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies close() when having sufficient privilege, and a record has been written to the output stream.", - method = "close", - args = {} - ) public void testClose_SufficientPrivilege_NormalClose() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -587,12 +471,6 @@ public class SocketHandlerTest extends TestCase { * Test close() when having sufficient privilege, and no record has been * written to the output stream. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies close() when having sufficient privilege, and no record has been written to the output stream.", - method = "close", - args = {} - ) public void testClose_SufficientPrivilege_DirectClose() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -618,12 +496,6 @@ public class SocketHandlerTest extends TestCase { /* * Test close() when having insufficient privilege. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies close() when having insufficient privilege.", - method = "close", - args = {} - ) public void testClose_InsufficientPrivilege() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -658,12 +530,6 @@ public class SocketHandlerTest extends TestCase { /* * Test publish(), use no filter, having output stream, normal log record. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies publish(), use no filter, having output stream, normal log record.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish_NoFilter() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -703,12 +569,6 @@ public class SocketHandlerTest extends TestCase { /* * Test publish(), use a filter, having output stream, normal log record. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies publish(), use a filter, having output stream, normal log record.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish_WithFilter() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -739,12 +599,6 @@ public class SocketHandlerTest extends TestCase { /* * Test publish(), null log record, having output stream */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies publish(), null log record, having output stream.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish_Null() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -772,12 +626,6 @@ public class SocketHandlerTest extends TestCase { /* * Test publish(), a log record with empty msg, having output stream */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies publish() method, a log record with empty msg, having output stream.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish_EmptyMsg() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -803,12 +651,6 @@ public class SocketHandlerTest extends TestCase { /* * Test publish(), a log record with null msg, having output stream */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies publish(), a log record with null msg, having output stream.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish_NullMsg() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className @@ -834,12 +676,6 @@ public class SocketHandlerTest extends TestCase { /* * Test publish(), after close. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Verifies publish() method after close.", - method = "publish", - args = {java.util.logging.LogRecord.class} - ) public void testPublish_AfterClose() throws Exception { Properties p = new Properties(); p.put("java.util.logging.SocketHandler.formatter", className diff --git a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/XMLFormatterTest.java b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/XMLFormatterTest.java index 90c93c9..175ffb5 100644 --- a/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/XMLFormatterTest.java +++ b/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/XMLFormatterTest.java @@ -17,12 +17,6 @@ package org.apache.harmony.logging.tests.java.util.logging; -import dalvik.annotation.AndroidOnly; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import junit.framework.TestCase; import java.io.UnsupportedEncodingException; @@ -32,7 +26,6 @@ import java.util.logging.Level; import java.util.logging.LogRecord; import java.util.logging.XMLFormatter; -@TestTargetClass(XMLFormatter.class) public class XMLFormatterTest extends TestCase { XMLFormatter formatter = null; @@ -52,26 +45,6 @@ public class XMLFormatterTest extends TestCase { * test for constructor public XMLFormatter() * */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "XMLFormatter", - args = {} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getHead", - args = {java.util.logging.Handler.class} - ), - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getTail", - args = {java.util.logging.Handler.class} - ) - }) public void testXMLFormatter() throws SecurityException, UnsupportedEncodingException { @@ -93,12 +66,6 @@ public class XMLFormatterTest extends TestCase { .getTail(handler).indexOf("/log>") > 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ) public void testLocalFormat() { // if set resource bundle, output will use localized message, // but put the original message into the key element @@ -130,12 +97,6 @@ public class XMLFormatterTest extends TestCase { assertTrue(result.indexOf("<key>") < 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ) public void testFullFormat() { lr.setSourceClassName("source class"); lr.setSourceMethodName("source method"); @@ -168,12 +129,6 @@ public class XMLFormatterTest extends TestCase { assertTrue(output.indexOf("<key>pattern</key>") > 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ) public void testFormat() { String output = formatter.format(lr); // System.out.println(output); @@ -193,12 +148,6 @@ public class XMLFormatterTest extends TestCase { assertTrue(output.indexOf("<key>") < 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getHead", - args = {java.util.logging.Handler.class} - ) public void testGetHead() throws SecurityException, UnsupportedEncodingException { String result = formatter.getHead(handler); @@ -230,12 +179,6 @@ public class XMLFormatterTest extends TestCase { /* * test for method public String getTail(Handler h) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "getTail", - args = {java.util.logging.Handler.class} - ) public void testGetTail() { assertEquals( "Tail string with null handler should be equal expected value", @@ -248,28 +191,7 @@ public class XMLFormatterTest extends TestCase { "</log>", formatter.getTail(handler).trim()); } - @TestTargets({ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "format", - args = {java.util.logging.LogRecord.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getTail", - args = {java.util.logging.Handler.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "XMLFormatter", - args = {} - ) - }) - @AndroidOnly("This test fails on RI. Output doesn't contain " + - "<message/>.") + // This test fails on RI. Output doesn't contain <message/>. public void testInvalidParameter() { formatter.getTail(null); try { diff --git a/luni-kernel/src/test/java/tests/api/org/apache/harmony/kernel/dalvik/ThreadsTest.java b/luni-kernel/src/test/java/tests/api/org/apache/harmony/kernel/dalvik/ThreadsTest.java index c24e297..8ba2445 100644 --- a/luni-kernel/src/test/java/tests/api/org/apache/harmony/kernel/dalvik/ThreadsTest.java +++ b/luni-kernel/src/test/java/tests/api/org/apache/harmony/kernel/dalvik/ThreadsTest.java @@ -21,15 +21,10 @@ import java.lang.reflect.Field; import junit.framework.Assert; import junit.framework.TestCase; import sun.misc.Unsafe; -import dalvik.annotation.AndroidOnly; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; /** * Tests for the <code>park()</code> functionality of {@link Unsafe}. */ -@TestTargetClass(Unsafe.class) public class ThreadsTest extends TestCase { private static Unsafe UNSAFE = null; private static RuntimeException INITIALIZEFAILED = null; @@ -54,13 +49,6 @@ public class ThreadsTest extends TestCase { } /** Test the case where the park times out. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "unpark", - args = {Object.class} - ) - @AndroidOnly("Accesses Android-specific private field") public void test_parkFor_1() { Parker parker = new Parker(false, 500); Thread parkerThread = new Thread(parker); @@ -73,13 +61,6 @@ public class ThreadsTest extends TestCase { } /** Test the case where the unpark happens before the timeout. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "unpark", - args = {Object.class} - ) - @AndroidOnly("Accesses Android-specific private field") public void test_parkFor_2() { Parker parker = new Parker(false, 1000); Thread parkerThread = new Thread(parker); @@ -92,13 +73,6 @@ public class ThreadsTest extends TestCase { } /** Test the case where the thread is preemptively unparked. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "unpark", - args = {Object.class} - ) - @AndroidOnly("Accesses Android-specific private field") public void test_parkFor_3() { Parker parker = new Parker(false, 1000); Thread parkerThread = new Thread(parker); @@ -109,13 +83,6 @@ public class ThreadsTest extends TestCase { } /** Test the case where the park times out. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "unpark", - args = {Object.class} - ) - @AndroidOnly("Accesses Android-specific private field") public void test_parkUntil_1() { Parker parker = new Parker(true, 500); Thread parkerThread = new Thread(parker); @@ -128,13 +95,6 @@ public class ThreadsTest extends TestCase { } /** Test the case where the unpark happens before the timeout. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "unpark", - args = {Object.class} - ) - @AndroidOnly("Accesses Android-specific private field") public void test_parkUntil_2() { Parker parker = new Parker(true, 1000); Thread parkerThread = new Thread(parker); @@ -147,13 +107,6 @@ public class ThreadsTest extends TestCase { } /** Test the case where the thread is preemptively unparked. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "unpark", - args = {Object.class} - ) - @AndroidOnly("Accesses Android-specific private field") public void test_parkUntil_3() { Parker parker = new Parker(true, 1000); Thread parkerThread = new Thread(parker); diff --git a/luni/src/test/java/org/apache/harmony/luni/platform/OSMemoryTest.java b/luni/src/test/java/org/apache/harmony/luni/platform/OSMemoryTest.java index a546289..fc34219 100644 --- a/luni/src/test/java/org/apache/harmony/luni/platform/OSMemoryTest.java +++ b/luni/src/test/java/org/apache/harmony/luni/platform/OSMemoryTest.java @@ -17,24 +17,12 @@ package org.apache.harmony.luni.platform; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.AndroidOnly; - import junit.framework.TestCase; /** * Tests org.apache.harmony.luni.platform.OSMemory (via IMemorySystem). */ -@TestTargetClass(org.apache.harmony.luni.platform.OSMemory.class) public class OSMemoryTest extends TestCase { - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "memset", - args = {} - ) public void testMemset() { IMemorySystem memory = Platform.getMemorySystem(); @@ -62,12 +50,6 @@ public class OSMemoryTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "setIntArray", - args = {} - ) public void testSetIntArray() { IMemorySystem memory = Platform.getMemorySystem(); @@ -115,12 +97,6 @@ public class OSMemoryTest extends TestCase { (((n >> 24) & 0xff) << 0); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "setShortArray", - args = {} - ) public void testSetShortArray() { IMemorySystem memory = Platform.getMemorySystem(); diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalArithmeticTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalArithmeticTest.java index 3119131..bdb4cf9 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalArithmeticTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalArithmeticTest.java @@ -17,18 +17,13 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.KnownFailure; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; - import junit.framework.TestCase; import java.math.BigDecimal; import java.math.BigInteger; import java.math.MathContext; import java.math.RoundingMode; -@TestTargetClass(BigDecimal.class) + /** * Class: java.math.BigDecimal * Methods: add, subtract, multiply, divide @@ -38,12 +33,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of equal positive scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigDecimal.class} - ) public void testAddEqualScalePosPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 10; @@ -61,12 +50,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of equal positive scales using MathContext */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Together with all other methods including a MathContext these tests form m a complete test set.", - method = "add", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testAddMathContextEqualScalePosPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 10; @@ -85,12 +68,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of equal negative scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigDecimal.class} - ) public void testAddEqualScaleNegNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -10; @@ -108,12 +85,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of equal negative scales using MathContext */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Together with all other methods including a MathContext these tests form a complete test set.", - method = "add", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testAddMathContextEqualScaleNegNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -10; @@ -132,12 +103,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of different scales; the first is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigDecimal.class} - ) public void testAddDiffScalePosNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -155,12 +120,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of different scales using MathContext; the first is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Together with all other methods including a MathContext these tests form a complete test set.", - method = "add", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testAddMathContextDiffScalePosNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -179,12 +138,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two numbers of different scales; the first is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigDecimal.class} - ) public void testAddDiffScaleNegPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -15; @@ -202,12 +155,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Add two zeroes of different scales; the first is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigDecimal.class} - ) public void testAddDiffScaleZeroZero() { String a = "0"; int aScale = -15; @@ -225,12 +172,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "add", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testAddMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -259,12 +200,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Subtract two numbers of equal positive scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "subtract", - args = {java.math.BigDecimal.class} - ) public void testSubtractEqualScalePosPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 10; @@ -282,12 +217,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Subtract two numbers of equal positive scales using MathContext */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "subtract", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testSubtractMathContextEqualScalePosPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 10; @@ -306,12 +235,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Subtract two numbers of equal negative scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "subtract", - args = {java.math.BigDecimal.class} - ) public void testSubtractEqualScaleNegNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -10; @@ -329,12 +252,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Subtract two numbers of different scales; the first is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "subtract", - args = {java.math.BigDecimal.class} - ) public void testSubtractDiffScalePosNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -353,12 +270,6 @@ public class BigDecimalArithmeticTest extends TestCase { * Subtract two numbers of different scales using MathContext; * the first is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "subtract", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testSubtractMathContextDiffScalePosNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -377,12 +288,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Subtract two numbers of different scales; the first is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "subtract", - args = {java.math.BigDecimal.class} - ) public void testSubtractDiffScaleNegPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -15; @@ -401,12 +306,6 @@ public class BigDecimalArithmeticTest extends TestCase { * Subtract two numbers of different scales using MathContext; * the first is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "subtract", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testSubtractMathContextDiffScaleNegPos() { String a = "986798656676789766678767876078779810457634781384756794987"; int aScale = -15; @@ -425,12 +324,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "subtract", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testSubtractMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -457,12 +350,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of positive scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "multiply", - args = {java.math.BigDecimal.class} - ) public void testMultiplyScalePosPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -480,12 +367,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of positive scales using MathContext */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "multiply", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testMultiplyMathContextScalePosPos() { String a = "97665696756578755423325476545428779810457634781384756794987"; int aScale = -25; @@ -504,12 +385,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of negative scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "multiply", - args = {java.math.BigDecimal.class} - ) public void testMultiplyEqualScaleNegNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -15; @@ -527,12 +402,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of different scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "multiply", - args = {java.math.BigDecimal.class} - ) public void testMultiplyDiffScalePosNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 10; @@ -550,12 +419,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of different scales using MathContext */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "multiply", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testMultiplyMathContextDiffScalePosNeg() { String a = "987667796597975765768768767866756808779810457634781384756794987"; int aScale = 100; @@ -574,12 +437,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of different scales */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method.", - method = "multiply", - args = {java.math.BigDecimal.class} - ) public void testMultiplyDiffScaleNegPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -15; @@ -597,12 +454,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Multiply two numbers of different scales using MathContext */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "multiply", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testMultiplyMathContextDiffScaleNegPos() { String a = "488757458676796558668876576576579097029810457634781384756794987"; int aScale = -63; @@ -621,12 +472,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "multiply", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testMultiplyMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -647,12 +492,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * pow(int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "pow", - args = {int.class} - ) public void testPow() { String a = "123121247898748298842980"; int aScale = 10; @@ -671,12 +510,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * pow(0) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "pow", - args = {int.class} - ) public void testPow0() { String a = "123121247898748298842980"; int aScale = 10; @@ -692,12 +525,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * ZERO.pow(0) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "pow", - args = {int.class} - ) public void testZeroPow0() { String c = "1"; int cScale = 0; @@ -709,12 +536,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "pow", - args = {int.class} - ) public void testPowNonTrivial() { BigDecimal a, b, res; @@ -736,12 +557,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * pow(int, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "pow", - args = {int.class, java.math.MathContext.class} - ) public void testPowMathContext() { String a = "123121247898748298842980"; int aScale = 10; @@ -758,12 +573,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "pow", - args = {int.class, java.math.MathContext.class} - ) public void testPowMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -832,12 +641,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide by zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "ArithmeticException checked.", - method = "divide", - args = {java.math.BigDecimal.class} - ) public void testDivideByZero() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -854,12 +657,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide with ROUND_UNNECESSARY */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException only checked.", - method = "divide", - args = {java.math.BigDecimal.class, int.class} - ) public void testDivideExceptionRM() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -878,12 +675,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide with invalid rounding mode */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "IllegalArgumentException only checked.", - method = "divide", - args = {java.math.BigDecimal.class, int.class} - ) public void testDivideExceptionInvalidRM() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -902,12 +693,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divide", - args = {java.math.BigDecimal.class, int.class} - ) public void testDivideINonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -938,12 +723,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: local variable exponent is less than zero */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideExpLessZero() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 15; @@ -961,12 +740,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: local variable exponent is equal to zero */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed. Should be added checking for ArithmeticException to complete functional testing.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideExpEqualsZero() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -15; @@ -984,12 +757,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: local variable exponent is greater than zero */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideExpGreaterZero() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -15; @@ -1007,12 +774,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: remainder is zero */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRemainderIsZero() { String a = "8311389578904553209874735431110"; int aScale = -15; @@ -1030,12 +791,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_UP, result is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundUpNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1053,12 +808,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_UP, result is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundUpPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1076,12 +825,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_DOWN, result is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundDownNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1099,12 +842,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_DOWN, result is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundDownPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1122,12 +859,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_FLOOR, result is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundFloorPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1145,12 +876,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_FLOOR, result is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundFloorNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1168,12 +893,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_CEILING, result is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundCeilingPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1191,12 +910,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_CEILING, result is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundCeilingNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1214,12 +927,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_UP, result is positive; distance = -1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfUpPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1237,12 +944,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_UP, result is negative; distance = -1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfUpNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1260,12 +961,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_UP, result is positive; distance = 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfUpPos1() { String a = "92948782094488478231212478987482988798104576347813847567949855464535634534563456"; int aScale = -24; @@ -1283,12 +978,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_UP, result is negative; distance = 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfUpNeg1() { String a = "-92948782094488478231212478987482988798104576347813847567949855464535634534563456"; int aScale = -24; @@ -1306,12 +995,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_UP, result is negative; equidistant */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfUpNeg2() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1329,12 +1012,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_DOWN, result is positive; distance = -1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfDownPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1352,12 +1029,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_DOWN, result is negative; distance = -1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfDownNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1375,12 +1046,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_DOWN, result is positive; distance = 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfDownPos1() { String a = "92948782094488478231212478987482988798104576347813847567949855464535634534563456"; int aScale = -24; @@ -1398,12 +1063,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_DOWN, result is negative; distance = 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfDownNeg1() { String a = "-92948782094488478231212478987482988798104576347813847567949855464535634534563456"; int aScale = -24; @@ -1421,12 +1080,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_UP, result is negative; equidistant */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfDownNeg2() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1444,12 +1097,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_EVEN, result is positive; distance = -1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfEvenPos() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1467,12 +1114,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_EVEN, result is negative; distance = -1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfEvenNeg() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -1490,12 +1131,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_EVEN, result is positive; distance = 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfEvenPos1() { String a = "92948782094488478231212478987482988798104576347813847567949855464535634534563456"; int aScale = -24; @@ -1513,12 +1148,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_EVEN, result is negative; distance = 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfEvenNeg1() { String a = "-92948782094488478231212478987482988798104576347813847567949855464535634534563456"; int aScale = -24; @@ -1536,12 +1165,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide: rounding mode is ROUND_HALF_EVEN, result is negative; equidistant */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ROUND_UNNECESSARY and exceptions checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideRoundHalfEvenNeg2() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1559,12 +1182,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void testDivideIINonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -1593,12 +1210,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide to BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Common functionality checked", - method = "divide", - args = {java.math.BigDecimal.class} - ) public void testDivideBigDecimal1() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1616,12 +1227,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Divide to BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Common functionality checked", - method = "divide", - args = {java.math.BigDecimal.class} - ) public void testDivideBigDecimal2() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1639,12 +1244,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeUP() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1663,12 +1262,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeDOWN() { String a = "-37361671119238118911893939591735"; int aScale = 10; @@ -1687,12 +1280,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeCEILING() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 100; @@ -1711,12 +1298,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeFLOOR() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 100; @@ -1735,12 +1316,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeHALF_UP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = -51; @@ -1761,12 +1336,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeHALF_DOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 5; @@ -1785,12 +1354,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, scale, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException and UNNECESSARY round mode checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) public void testDivideBigDecimalScaleRoundingModeHALF_EVEN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 5; @@ -1809,15 +1372,9 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divide", - args = {java.math.BigDecimal.class, int.class, java.math.RoundingMode.class} - ) - @KnownFailure("Has a rounding problem. seems like the precision is" - + " 1 too small and cuts off the last digit. also this test might" - + "not be correct. The name implies that scale should be used.") + // Has a rounding problem. seems like the precision is + // 1 too small and cuts off the last digit. also this test might + // not be correct. The name implies that scale should be used. public void testDivideScaleRoundingModeNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -1850,12 +1407,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextUP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 15; @@ -1876,12 +1427,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextDOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 15; @@ -1902,12 +1447,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextCEILING() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 15; @@ -1928,12 +1467,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextFLOOR() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 15; @@ -1954,12 +1487,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextHALF_UP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -1980,12 +1507,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextHALF_DOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2006,12 +1527,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divide(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideBigDecimalScaleMathContextHALF_EVEN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2032,14 +1547,7 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divide", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) - @KnownFailure("The same test and the same problem like " - + "testDivideScaleRoundingModeNonTrivial") + // The same test and the same problem like testDivideScaleRoundingModeNonTrivial. public void testDivideMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -2090,11 +1598,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideToIntegralValue(BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "divideToIntegralValue", - args = {java.math.BigDecimal.class} - ) public void testDivideToIntegralValue() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2109,11 +1612,6 @@ public class BigDecimalArithmeticTest extends TestCase { assertEquals("incorrect scale", resScale, result.scale()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "divideToIntegralValue", - args = {java.math.BigDecimal.class} - ) public void testDivideToIntegralValueByZero() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2136,12 +1634,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideToIntegralValue(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divideToIntegralValue", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideToIntegralValueMathContextUP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2162,12 +1654,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideToIntegralValue(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divideToIntegralValue", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideToIntegralValueMathContextDOWN() { String a = "3736186567876876578956958769675785435673453453653543654354365435675671119238118911893939591735"; int aScale = 45; @@ -2188,12 +1674,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divideToIntegralValue", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideToIntegralValueMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -2229,12 +1709,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideAndRemainder(BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "divideAndRemainder", - args = {java.math.BigDecimal.class} - ) public void testDivideAndRemainder1() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2256,12 +1730,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideAndRemainder(BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "divideAndRemainder", - args = {java.math.BigDecimal.class} - ) public void testDivideAndRemainder2() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = -45; @@ -2285,12 +1753,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideAndRemainder(BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "divideAndRemainder", - args = {java.math.BigDecimal.class} - ) public void testDivideAndRemainderByZero() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2313,12 +1775,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideAndRemainder(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divideAndRemainder", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideAndRemainderMathContextUP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2343,12 +1799,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * divideAndRemainder(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "divideAndRemainder", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideAndRemainderMathContextDOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2373,12 +1823,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divideAndRemainder", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testDivideAndRemainderMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res[]; @@ -2413,11 +1857,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * remainder(BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "remainder", - args = {java.math.BigDecimal.class} - ) public void testRemainder1() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2435,11 +1874,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * remainder(BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "remainder", - args = {java.math.BigDecimal.class} - ) public void testRemainder2() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = -45; @@ -2454,11 +1888,6 @@ public class BigDecimalArithmeticTest extends TestCase { assertEquals("incorrect quotient scale", resScale, result.scale()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "remainder", - args = {java.math.BigDecimal.class} - ) public void testRemainderByZero() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2480,12 +1909,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * remainder(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "remainder", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testRemainderMathContextHALF_UP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2506,12 +1929,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * remainder(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "remainder", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testRemainderMathContextHALF_DOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = -45; @@ -2532,12 +1949,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * Non-trivial tests using MathContext: */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "remainder", - args = {java.math.BigDecimal.class, java.math.MathContext.class} - ) public void testRemainderMathContextNonTrivial() { MathContext mc; BigDecimal a, b, res; @@ -2572,12 +1983,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * round(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "round", - args = {java.math.MathContext.class} - ) public void testRoundMathContextHALF_DOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = -45; @@ -2595,12 +2000,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * round(BigDecimal, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "round", - args = {java.math.MathContext.class} - ) public void testRoundMathContextHALF_UP() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2618,12 +2017,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * round(BigDecimal, MathContext) when precision = 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "round", - args = {java.math.MathContext.class} - ) public void testRoundMathContextPrecision0() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2637,12 +2030,6 @@ public class BigDecimalArithmeticTest extends TestCase { assertEquals("incorrect quotient scale", aScale, result.scale()); } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "round", - args = {java.math.MathContext.class} - ) public void testRoundNonTrivial() { MathContext mc; String biStr = new String( "12345678901234567890123456789012345.0E+10"); @@ -2693,12 +2080,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * ulp() of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for ulp method.", - method = "ulp", - args = {} - ) public void testUlpPos() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = -45; @@ -2713,12 +2094,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * ulp() of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for ulp method.", - method = "ulp", - args = {} - ) public void testUlpNeg() { String a = "-3736186567876876578956958765675671119238118911893939591735"; int aScale = 45; @@ -2733,12 +2108,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * ulp() of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for ulp method.", - method = "ulp", - args = {} - ) public void testUlpZero() { String a = "0"; int aScale = 2; @@ -2755,12 +2124,6 @@ public class BigDecimalArithmeticTest extends TestCase { /** * @tests java.math.BigDecimal#add(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigDecimal.class} - ) public void test_addBigDecimal() { BigDecimal add1 = new BigDecimal("23.456"); BigDecimal add2 = new BigDecimal("3849.235"); @@ -2779,12 +2142,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.MathContext) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeUP() { String a = "-37361671119238118911893939591735"; String b = "74723342238476237823787879183470"; @@ -2800,12 +2157,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeDOWN() { String a = "-37361671119238118911893939591735"; String b = "74723342238476237823787879183470"; @@ -2821,12 +2172,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeCEILING() { String a = "3736186567876876578956958765675671119238118911893939591735"; String b = "74723342238476237823787879183470"; @@ -2842,12 +2187,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeFLOOR() { String a = "3736186567876876578956958765675671119238118911893939591735"; String b = "74723342238476237823787879183470"; @@ -2863,12 +2202,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeHALF_UP() { String a = "3736186567876876578956958765675671119238118911893939591735"; String b = "74723342238476237823787879183470"; @@ -2884,12 +2217,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeHALF_DOWN() { String a = "3736186567876876578956958765675671119238118911893939591735"; int aScale = 5; @@ -2909,12 +2236,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingModeHALF_EVEN() { String a = "3736186567876876578956958765675671119238118911893939591735"; String b = "74723342238476237823787879183470"; @@ -2930,12 +2251,6 @@ public class BigDecimalArithmeticTest extends TestCase { * @tests java.math.BigDecimal#divide(java.math.BigDecimal, * java.math.RoundingMode) divide(BigDecimal, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigDecimal.class, java.math.RoundingMode.class} - ) public void test_DivideBigDecimalRoundingExc() { String a = "3736186567876876578956958765675671119238118911893939591735"; String b = "74723342238476237823787879183470"; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalCompareTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalCompareTest.java index 97e8a5d..b20491b 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalCompareTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalCompareTest.java @@ -21,17 +21,13 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; - import junit.framework.TestCase; import java.math.BigDecimal; import java.math.BigInteger; import java.math.MathContext; import java.math.RoundingMode; -@TestTargetClass(BigDecimal.class) + /** * Class: java.math.BigDecimal * Methods: abs, compareTo, equals, hashCode, @@ -41,12 +37,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Abs() of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for abs method.", - method = "abs", - args = {} - ) public void testAbsNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -57,12 +47,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Abs() of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for abs method.", - method = "abs", - args = {} - ) public void testAbsPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -73,12 +57,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Abs(MathContext) of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Together with all other methods including a MathContext these tests for a complete test set.", - method = "abs", - args = {java.math.MathContext.class} - ) public void testAbsMathContextNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -115,12 +93,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Abs(MathContext) of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Together with all other methods including a MathContext these tests for a complete test set.", - method = "abs", - args = {java.math.MathContext.class} - ) public void testAbsMathContextPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -137,12 +109,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Compare to a number of an equal scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void testCompareEqualScale1() { String a = "12380964839238475457356735674573563567890295784902768787678287"; int aScale = 18; @@ -157,12 +123,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Compare to a number of an equal scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void testCompareEqualScale2() { String a = "12380964839238475457356735674573563567890295784902768787678287"; int aScale = 18; @@ -177,12 +137,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Compare to a number of an greater scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void testCompareGreaterScale1() { String a = "12380964839238475457356735674573563567890295784902768787678287"; int aScale = 28; @@ -197,12 +151,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Compare to a number of an greater scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void testCompareGreaterScale2() { String a = "12380964839238475457356735674573563567890295784902768787678287"; int aScale = 48; @@ -217,12 +165,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Compare to a number of an less scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void testCompareLessScale1() { String a = "12380964839238475457356735674573563567890295784902768787678287"; int aScale = 18; @@ -237,12 +179,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Compare to a number of an less scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void testCompareLessScale2() { String a = "12380964839238475457356735674573"; int aScale = 36; @@ -257,12 +193,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Equals() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsUnequal1() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -276,12 +206,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Equals() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsUnequal2() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -295,12 +219,6 @@ public class BigDecimalCompareTest extends TestCase { /** * Equals() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsUnequal3() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -312,12 +230,6 @@ public class BigDecimalCompareTest extends TestCase { /** * equals() for equal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsEqual() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -331,12 +243,6 @@ public class BigDecimalCompareTest extends TestCase { /** * equals() for equal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsNull() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -347,12 +253,6 @@ public class BigDecimalCompareTest extends TestCase { /** * hashCode() for equal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for hashCode method.", - method = "hashCode", - args = {} - ) public void testHashCodeEqual() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = -24; @@ -366,12 +266,6 @@ public class BigDecimalCompareTest extends TestCase { /** * hashCode() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for hashCode method.", - method = "hashCode", - args = {} - ) public void testHashCodeUnequal() { String a = "8478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -385,12 +279,6 @@ public class BigDecimalCompareTest extends TestCase { /** * max() for equal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigDecimal.class} - ) public void testMaxEqual() { String a = "8478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -407,12 +295,6 @@ public class BigDecimalCompareTest extends TestCase { /** * max() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigDecimal.class} - ) public void testMaxUnequal1() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 24; @@ -429,12 +311,6 @@ public class BigDecimalCompareTest extends TestCase { /** * max() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigDecimal.class} - ) public void testMaxUnequal2() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -451,12 +327,6 @@ public class BigDecimalCompareTest extends TestCase { /** * min() for equal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for min method.", - method = "min", - args = {java.math.BigDecimal.class} - ) public void testMinEqual() { String a = "8478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -473,12 +343,6 @@ public class BigDecimalCompareTest extends TestCase { /** * min() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for min method.", - method = "min", - args = {java.math.BigDecimal.class} - ) public void testMinUnequal1() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 24; @@ -495,12 +359,6 @@ public class BigDecimalCompareTest extends TestCase { /** * min() for unequal BigDecimals */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for min method.", - method = "min", - args = {java.math.BigDecimal.class} - ) public void testMinUnequal2() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -517,12 +375,6 @@ public class BigDecimalCompareTest extends TestCase { /** * plus() for a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for plus method.", - method = "plus", - args = {} - ) public void testPlusPositive() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -536,12 +388,6 @@ public class BigDecimalCompareTest extends TestCase { /** * plus(MathContext) for a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Together with all other methods including a MathContext these tests for a complete test set.", - method = "plus", - args = {java.math.MathContext.class} - ) public void testPlusMathContextPositive() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -559,12 +405,6 @@ public class BigDecimalCompareTest extends TestCase { /** * plus() for a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for plus method.", - method = "plus", - args = {} - ) public void testPlusNegative() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -578,12 +418,6 @@ public class BigDecimalCompareTest extends TestCase { /** * plus(MathContext) for a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Together with all other methods including a MathContext these tests for a complete test set.", - method = "plus", - args = {java.math.MathContext.class} - ) public void testPlusMathContextNegative() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 49; @@ -601,12 +435,6 @@ public class BigDecimalCompareTest extends TestCase { /** * negate() for a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for negate method.", - method = "negate", - args = {} - ) public void testNegatePositive() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -620,12 +448,6 @@ public class BigDecimalCompareTest extends TestCase { /** * negate(MathContext) for a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Together with all other methods including a MathContext these tests for a complete test set.", - method = "negate", - args = {java.math.MathContext.class} - ) public void testNegateMathContextPositive() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; MathContext mc = new MathContext(37, RoundingMode.FLOOR); @@ -650,12 +472,6 @@ public class BigDecimalCompareTest extends TestCase { /** * negate() for a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for negate method.", - method = "negate", - args = {} - ) public void testNegateNegative() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -669,12 +485,6 @@ public class BigDecimalCompareTest extends TestCase { /** * negate(MathContext) for a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "Together with all other methods including a MathContext these tests for a complete test set.", - method = "negate", - args = {java.math.MathContext.class} - ) public void testNegateMathContextNegative() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 49; @@ -692,12 +502,6 @@ public class BigDecimalCompareTest extends TestCase { /** * signum() for a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for signum method.", - method = "signum", - args = {} - ) public void testSignumPositive() { String a = "92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -708,12 +512,6 @@ public class BigDecimalCompareTest extends TestCase { /** * signum() for a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for signum method.", - method = "signum", - args = {} - ) public void testSignumNegative() { String a = "-92948782094488478231212478987482988429808779810457634781384756794987"; int aScale = 41; @@ -724,12 +522,6 @@ public class BigDecimalCompareTest extends TestCase { /** * signum() for zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for signum method.", - method = "signum", - args = {} - ) public void testSignumZero() { String a = "0"; int aScale = 41; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConstructorsTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConstructorsTest.java index 74d0cb0..3657096 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConstructorsTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConstructorsTest.java @@ -21,17 +21,13 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; - import junit.framework.TestCase; import java.math.BigDecimal; import java.math.BigInteger; import java.math.MathContext; import java.math.RoundingMode; -@TestTargetClass(BigDecimal.class) + /** * Class: java.math.BigDecimal * Methods: constructors and fields @@ -40,11 +36,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * check ONE */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "tests BigDecimal.ONE to be 1.0d", - method = "!field:BigDecimal.ONE" - ) public void testFieldONE() { String oneS = "1"; double oneD = 1.0; @@ -55,11 +46,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * check TEN */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "tests BigDecimal.TEN to be 10.0d", - method = "!field:BigDecimal.TEN" - ) public void testFieldTEN() { String oneS = "10"; double oneD = 10.0; @@ -70,11 +56,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * check ZERO */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "tests BigDecimal.ZERO to be 0.0d", - method = "!field:BigDecimal.ZERO" - ) public void testFieldZERO() { String oneS = "0"; double oneD = 0.0; @@ -85,12 +66,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(BigInteger value) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.math.BigInteger.class} - ) public void testConstrBI() { String a = "1231212478987482988429808779810457634781384756794987"; BigInteger bA = new BigInteger(a); @@ -109,12 +84,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(BigInteger value, int scale) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.math.BigInteger.class, int.class} - ) public void testConstrBIScale() { String a = "1231212478987482988429808779810457634781384756794987"; BigInteger bA = new BigInteger(a); @@ -127,12 +96,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(BigInteger value, MathContext) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.math.BigInteger.class, java.math.MathContext.class} - ) public void testConstrBigIntegerMathContext() { String a = "1231212478987482988429808779810457634781384756794987"; BigInteger bA = new BigInteger(a); @@ -213,11 +176,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(BigInteger value, int scale, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "BigDecimal", - args = {java.math.BigInteger.class, int.class, java.math.MathContext.class} - ) public void testConstrBigIntegerScaleMathContext() { String a = "1231212478987482988429808779810457634781384756794987"; BigInteger bA = new BigInteger(a); @@ -368,11 +326,6 @@ public class BigDecimalConstructorsTest extends TestCase { assertEquals("incorrect value", "-1234567890123456789012345.679", bd.toString()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "BigDecimal", - args = {java.math.BigInteger.class, int.class, java.math.MathContext.class} - ) public void testConstrBigIntegerScaleMathContext_AndroidFailure() { MathContext mc; BigDecimal bd; @@ -385,12 +338,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(char[] value); */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {char[].class} - ) public void testConstrChar() { char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'}; BigDecimal result = new BigDecimal(value); @@ -410,12 +357,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(char[] value, int offset, int len); */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {char[].class, int.class, int.class} - ) public void testConstrCharIntInt() { char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'}; int offset = 3; @@ -437,12 +378,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(char[] value, int offset, int len, MathContext mc); */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "BigDecimal", - args = {char[].class, int.class, int.class, java.math.MathContext.class} - ) public void testConstrCharIntIntMathContext() { char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'}; int offset = 3; @@ -536,12 +471,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(char[] value, int offset, int len, MathContext mc); */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "BigDecimal", - args = {char[].class, int.class, int.class, java.math.MathContext.class} - ) public void testConstrCharIntIntMathContextException1() { char value[] = {'-', '1', '2', '3', '8', '0', '.', '4', '7', '3', '8', 'E', '-', '4', '2', '3'}; int offset = 3; @@ -559,12 +488,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(char[] value, MathContext mc); */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {char[].class, java.math.MathContext.class} - ) public void testConstrCharMathContext() { try { // Regression for HARMONY-783 @@ -617,12 +540,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(double value) when value is NaN */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDoubleNaN() { double a = Double.NaN; try { @@ -637,12 +554,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(double value) when value is positive infinity */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDoublePosInfinity() { double a = Double.POSITIVE_INFINITY; try { @@ -657,12 +568,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(double value) when value is positive infinity */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDoubleNegInfinity() { double a = Double.NEGATIVE_INFINITY; try { @@ -677,12 +582,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(double value) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDouble() { double a = 732546982374982347892379283571094797.287346782359284756; int aScale = 0; @@ -695,11 +594,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(double, MathContext) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "BigDecimal", - args = {double.class, java.math.MathContext.class} - ) public void testConstrDoubleMathContext() { double a = 732546982374982347892379283571094797.287346782359284756; int precision = 21; @@ -795,11 +689,6 @@ public class BigDecimalConstructorsTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "BigDecimal", - args = {double.class, java.math.MathContext.class} - ) public void testConstrDoubleMathContext_AndroidFailure() { BigDecimal bd; MathContext mc; @@ -843,12 +732,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(0.1) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDouble01() { double a = 1.E-1; int aScale = 55; @@ -861,12 +744,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(0.555) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDouble02() { double a = 0.555; int aScale = 53; @@ -879,12 +756,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(-0.1) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDoubleMinus01() { double a = -1.E-1; int aScale = 55; @@ -897,12 +768,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(int value) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {int.class} - ) public void testConstrInt() { int a = 732546982; String res = "732546982"; @@ -915,12 +780,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(int, MathContext) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {int.class, java.math.MathContext.class} - ) public void testConstrIntMathContext() { int a = 732546982; int precision = 21; @@ -936,12 +795,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(long value) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {long.class} - ) public void testConstrLong() { long a = 4576578677732546982L; String res = "4576578677732546982"; @@ -954,12 +807,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(long, MathContext) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {long.class, java.math.MathContext.class} - ) public void testConstrLongMathContext() { long a = 4576578677732546982L; int precision = 5; @@ -1037,12 +884,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(double value) when value is denormalized */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(double) constructor.", - method = "BigDecimal", - args = {double.class} - ) public void testConstrDoubleDenormalized() { double a = 2.274341322658976E-309; int aScale = 1073; @@ -1056,12 +897,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value) * when value is not a valid representation of BigDecimal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringException() { String a = "-238768.787678287a+10"; try { @@ -1075,12 +910,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(String value) when exponent is empty. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringExceptionEmptyExponent1() { String a = "-238768.787678287e"; try { @@ -1093,12 +922,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(String value) when exponent is empty. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringExceptionEmptyExponent2() { String a = "-238768.787678287e-"; try { @@ -1112,12 +935,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value) when exponent is greater than * Integer.MAX_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringExceptionExponentGreaterIntegerMax() { String a = "-238768.787678287e214748364767876"; try { @@ -1131,12 +948,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value) when exponent is less than * Integer.MIN_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringExceptionExponentLessIntegerMin() { String a = "-238768.787678287e-214748364767876"; try { @@ -1150,12 +961,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value) * when exponent is Integer.MAX_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringExponentIntegerMax() { String a = "-238768.787678287e2147483647"; int aScale = -2147483638; @@ -1169,12 +974,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value) * when exponent is Integer.MIN_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringExponentIntegerMin() { String a = ".238768e-2147483648"; try { @@ -1189,12 +988,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(String value); value does not contain exponent */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithoutExpPos1() { String a = "732546982374982347892379283571094797.287346782359284756"; int aScale = 18; @@ -1207,12 +1000,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(String value); value does not contain exponent */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithoutExpPos2() { String a = "+732546982374982347892379283571094797.287346782359284756"; int aScale = 18; @@ -1225,12 +1012,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(String value); value does not contain exponent */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithoutExpNeg() { String a = "-732546982374982347892379283571094797.287346782359284756"; int aScale = 18; @@ -1244,12 +1025,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); value does not contain exponent * and decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithoutExpWithoutPoint() { String a = "-732546982374982347892379283571094797287346782359284756"; int aScale = 0; @@ -1263,12 +1038,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); value contains exponent * and does not contain decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithoutPoint1() { String a = "-238768787678287e214"; int aScale = -214; @@ -1282,12 +1051,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); value contains exponent * and does not contain decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithoutPoint2() { String a = "-238768787678287e-214"; int aScale = 214; @@ -1301,12 +1064,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); value contains exponent * and does not contain decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithoutPoint3() { String a = "238768787678287e-214"; int aScale = 214; @@ -1320,12 +1077,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); value contains exponent * and does not contain decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithoutPoint4() { String a = "238768787678287e+214"; int aScale = -214; @@ -1339,12 +1090,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); value contains exponent * and does not contain decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithoutPoint5() { String a = "238768787678287E214"; int aScale = -214; @@ -1358,12 +1103,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); * value contains both exponent and decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithPoint1() { String a = "23985439837984782435652424523876878.7678287e+214"; int aScale = -207; @@ -1377,12 +1116,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); * value contains both exponent and decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithPoint2() { String a = "238096483923847545735673567457356356789029578490276878.7678287e-214"; int aScale = 221; @@ -1396,12 +1129,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); * value contains both exponent and decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithPoint3() { String a = "2380964839238475457356735674573563567890.295784902768787678287E+21"; int aScale = 0; @@ -1415,12 +1142,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); * value contains both exponent and decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithPoint4() { String a = "23809648392384754573567356745735635678.90295784902768787678287E+21"; int aScale = 2; @@ -1434,12 +1155,6 @@ public class BigDecimalConstructorsTest extends TestCase { * new BigDecimal(String value); * value contains both exponent and decimal point */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigDecimal(String) constructor.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void testConstrStringWithExponentWithPoint5() { String a = "238096483923847545735673567457356356789029.5784902768787678287E+21"; int aScale = -2; @@ -1452,12 +1167,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * new BigDecimal(String value, MathContext) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.lang.String.class, java.math.MathContext.class} - ) public void testConstrStringMathContext() { String a = "-238768787678287e214"; int precision = 5; @@ -1517,12 +1226,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.math.BigInteger, int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.math.BigInteger.class, int.class} - ) public void test_Constructor_java_math_BigInteger_int() { BigInteger value = new BigInteger("12345908"); BigDecimal big = new BigDecimal(value); @@ -1542,12 +1245,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * @tests java.math.BigDecimal#BigDecimal(double) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "BigDecimal", - args = {double.class} - ) public void test_Constructor_Double() { BigDecimal big = new BigDecimal(123E04); assertTrue("the BigDecimal value taking a double argument is not initialized properly", big @@ -1576,12 +1273,6 @@ public class BigDecimalConstructorsTest extends TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.lang.String) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void test_Constructor_java_lang_String() throws NumberFormatException { BigDecimal big = new BigDecimal("345.23499600293850"); assertTrue("the BigDecimal value is not initialized properly", big.toString().equals( diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConvertTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConvertTest.java index 5015ae0..e9a150e 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConvertTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalConvertTest.java @@ -21,18 +21,13 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; import java.math.MathContext; import junit.framework.TestCase; -@TestTargetClass(BigDecimal.class) + /** * Class: java.math.BigDecimal * Methods: doubleValue, floatValue, intValue, longValue, @@ -42,12 +37,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Double value of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -58,12 +47,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Double value of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -74,12 +57,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Double value of a large positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePosInfinity() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+400"; BigDecimal aNumber = new BigDecimal(a); @@ -90,12 +67,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Double value of a large negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegInfinity() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+400"; BigDecimal aNumber = new BigDecimal(a); @@ -106,12 +77,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Double value of a small negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueMinusZero() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-400"; BigDecimal aNumber = new BigDecimal(a); @@ -123,12 +88,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Double value of a small positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePlusZero() { String a = "123809648392384754573567356745735.63567890295784902768787678287E-400"; BigDecimal aNumber = new BigDecimal(a); @@ -140,12 +99,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Float value of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNeg() { String a = "-1238096483923847.6356789029578E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -156,12 +109,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Float value of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePos() { String a = "1238096483923847.6356789029578E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -172,12 +119,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Float value of a large positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePosInfinity() { String a = "123809648373567356745735.6356789787678287E+200"; BigDecimal aNumber = new BigDecimal(a); @@ -188,12 +129,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Float value of a large negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegInfinity() { String a = "-123809648392384755735.63567887678287E+200"; BigDecimal aNumber = new BigDecimal(a); @@ -204,12 +139,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Float value of a small negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueMinusZero() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-400"; BigDecimal aNumber = new BigDecimal(a); @@ -221,12 +150,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Float value of a small positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePlusZero() { String a = "123809648392384754573567356745735.63567890295784902768787678287E-400"; BigDecimal aNumber = new BigDecimal(a); @@ -238,12 +161,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Integer value of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValueNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -254,12 +171,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Integer value of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValuePos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -270,12 +181,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Long value of a negative BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for longValue method", - method = "longValue", - args = {} - ) public void testLongValueNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -286,12 +191,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Long value of a positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for longValue method", - method = "longValue", - args = {} - ) public void testLongValuePos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -302,12 +201,6 @@ public class BigDecimalConvertTest extends TestCase { /** * scaleByPowerOfTen(int n) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed", - method = "scaleByPowerOfTen", - args = {int.class} - ) public void testScaleByPowerOfTen1() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 13; @@ -322,12 +215,6 @@ public class BigDecimalConvertTest extends TestCase { /** * scaleByPowerOfTen(int n) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed", - method = "scaleByPowerOfTen", - args = {int.class} - ) public void testScaleByPowerOfTen2() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -13; @@ -342,12 +229,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a positive BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerPos1() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigInteger bNumber = new BigInteger("123809648392384754573567356745735635678902957849027687"); @@ -359,12 +240,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a positive BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerPos2() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+15"; BigInteger bNumber = new BigInteger("123809648392384754573567356745735635678902957849"); @@ -376,12 +251,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a positive BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerPos3() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+45"; BigInteger bNumber = new BigInteger("123809648392384754573567356745735635678902957849027687876782870000000000000000"); @@ -393,12 +262,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerNeg1() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigInteger bNumber = new BigInteger("-123809648392384754573567356745735635678902957849027687"); @@ -410,12 +273,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerNeg2() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+15"; BigInteger bNumber = new BigInteger("-123809648392384754573567356745735635678902957849"); @@ -427,12 +284,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerNeg3() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+45"; BigInteger bNumber = new BigInteger("-123809648392384754573567356745735635678902957849027687876782870000000000000000"); @@ -444,12 +295,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a small BigDecimal to BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigInteger method", - method = "toBigInteger", - args = {} - ) public void testToBigIntegerZero() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-500"; BigInteger bNumber = new BigInteger("0"); @@ -461,12 +306,6 @@ public class BigDecimalConvertTest extends TestCase { /** * toBigIntegerExact() */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigIntegerExact method", - method = "toBigIntegerExact", - args = {} - ) public void testToBigIntegerExact1() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+45"; BigDecimal aNumber = new BigDecimal(a); @@ -478,12 +317,6 @@ public class BigDecimalConvertTest extends TestCase { /** * toBigIntegerExact() */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toBigIntegerExact method", - method = "toBigIntegerExact", - args = {} - ) public void testToBigIntegerExactException() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-10"; BigDecimal aNumber = new BigDecimal(a); @@ -498,12 +331,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a positive BigDecimal to an engineering string representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toEngineeringString method", - method = "toEngineeringString", - args = {} - ) public void testToEngineeringStringPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E-501"; BigDecimal aNumber = new BigDecimal(a); @@ -514,12 +341,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to an engineering string representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toEngineeringString method", - method = "toEngineeringString", - args = {} - ) public void testToEngineeringStringNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-501"; BigDecimal aNumber = new BigDecimal(a); @@ -530,12 +351,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to an engineering string representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toEngineeringString method", - method = "toEngineeringString", - args = {} - ) public void testToEngineeringStringZeroPosExponent() { String a = "0.0E+16"; BigDecimal aNumber = new BigDecimal(a); @@ -546,12 +361,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to an engineering string representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toEngineeringString method", - method = "toEngineeringString", - args = {} - ) public void testToEngineeringStringZeroNegExponent() { String a = "0.0E-16"; BigDecimal aNumber = new BigDecimal(a); @@ -563,12 +372,6 @@ public class BigDecimalConvertTest extends TestCase { * Convert a negative BigDecimal with a negative exponent to a plain string * representation; scale == 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toPlainString method", - method = "toPlainString", - args = {} - ) public void testToPlainStringNegNegExp() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E-100"; BigDecimal aNumber = new BigDecimal(a); @@ -581,12 +384,6 @@ public class BigDecimalConvertTest extends TestCase { * to a plain string representation; * scale == 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toPlainString method", - method = "toPlainString", - args = {} - ) public void testToPlainStringNegPosExp() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E100"; BigDecimal aNumber = new BigDecimal(a); @@ -599,12 +396,6 @@ public class BigDecimalConvertTest extends TestCase { * to a plain string representation; * scale == 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toPlainString method", - method = "toPlainString", - args = {} - ) public void testToPlainStringPosNegExp() { String a = "123809648392384754573567356745735.63567890295784902768787678287E-100"; BigDecimal aNumber = new BigDecimal(a); @@ -617,12 +408,6 @@ public class BigDecimalConvertTest extends TestCase { * to a plain string representation; * scale == 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toPlainString method", - method = "toPlainString", - args = {} - ) public void testToPlainStringPosPosExp() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+100"; BigDecimal aNumber = new BigDecimal(a); @@ -634,12 +419,6 @@ public class BigDecimalConvertTest extends TestCase { * Convert a BigDecimal to a string representation; * scale == 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void testToStringZeroScale() { String a = "-123809648392384754573567356745735635678902957849027687876782870"; BigDecimal aNumber = new BigDecimal(new BigInteger(a)); @@ -650,12 +429,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a positive BigDecimal to a string representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void testToStringPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E-500"; BigDecimal aNumber = new BigDecimal(a); @@ -666,12 +439,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Convert a negative BigDecimal to a string representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void testToStringNeg() { String a = "-123.4564563673567380964839238475457356735674573563567890295784902768787678287E-5"; BigDecimal aNumber = new BigDecimal(a); @@ -682,12 +449,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a positive long value; scale == 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(long) method", - method = "valueOf", - args = {long.class} - ) public void testValueOfPosZeroScale() { long a = 98374823947823578L; BigDecimal aNumber = BigDecimal.valueOf(a); @@ -698,12 +459,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a negative long value; scale is 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(long) method", - method = "valueOf", - args = {long.class} - ) public void testValueOfNegZeroScale() { long a = -98374823947823578L; BigDecimal aNumber = BigDecimal.valueOf(a); @@ -714,12 +469,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a negative long value; scale is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(long) method", - method = "valueOf", - args = {long.class} - ) public void testValueOfNegScalePos() { long a = -98374823947823578L; int scale = 12; @@ -731,12 +480,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a negative long value; scale is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(long) method", - method = "valueOf", - args = {long.class} - ) public void testValueOfNegScaleNeg() { long a = -98374823947823578L; int scale = -12; @@ -748,12 +491,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a negative long value; scale is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(long) method", - method = "valueOf", - args = {long.class} - ) public void testValueOfPosScalePos() { long a = 98374823947823578L; int scale = 12; @@ -765,12 +502,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a negative long value; scale is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(long) method", - method = "valueOf", - args = {long.class} - ) public void testValueOfPosScaleNeg() { long a = 98374823947823578L; int scale = -12; @@ -782,12 +513,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a negative double value */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(double) method", - method = "valueOf", - args = {double.class} - ) public void testValueOfDoubleNeg() { double a = -65678765876567576.98788767; BigDecimal result = BigDecimal.valueOf(a); @@ -800,12 +525,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a positive double value */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(double) method", - method = "valueOf", - args = {double.class} - ) public void testValueOfDoublePos1() { double a = 65678765876567576.98788767; BigDecimal result = BigDecimal.valueOf(a); @@ -818,12 +537,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a positive double value */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(double) method", - method = "valueOf", - args = {double.class} - ) public void testValueOfDoublePos2() { double a = 12321237576.98788767; BigDecimal result = BigDecimal.valueOf(a); @@ -836,12 +549,6 @@ public class BigDecimalConvertTest extends TestCase { /** * Create a BigDecimal from a positive double value */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(double) method", - method = "valueOf", - args = {double.class} - ) public void testValueOfDoublePos3() { double a = 12321237576.9878838; BigDecimal result = BigDecimal.valueOf(a); @@ -854,12 +561,6 @@ public class BigDecimalConvertTest extends TestCase { /** * valueOf(Double.NaN) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf(double) method", - method = "valueOf", - args = {double.class} - ) public void testValueOfDoubleNaN() { double a = Double.NaN; try { @@ -876,12 +577,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#intValueExact() Integer value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValueExact method", - method = "intValueExact", - args = {} - ) public void test_IntValueExactNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -897,12 +592,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#intValueExact() Integer value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValueExact method", - method = "intValueExact", - args = {} - ) public void test_IntValueExactPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -918,12 +607,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#intValueExact() Integer value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValueExact method", - method = "intValueExact", - args = {} - ) public void test_IntValueExactFloatNeg() { BigDecimal aNumber = new BigDecimal("-2147483647.999"); try { @@ -938,12 +621,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#intValueExact() Integer value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValueExact method", - method = "intValueExact", - args = {} - ) public void test_IntValueExactFloatPos() { float a = 2147483646.99999F; BigDecimal aNumber = new BigDecimal(a); @@ -959,12 +636,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#intValueExact() Integer value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValueExact method", - method = "intValueExact", - args = {} - ) public void test_IntValueExactLongPos() { long a = 2147483647L; BigDecimal aNumber = new BigDecimal(a); @@ -976,12 +647,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#intValueExact() Integer value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValueExact method", - method = "intValueExact", - args = {} - ) public void test_IntValueExactLongNeg() { long a = -2147483648L; BigDecimal aNumber = new BigDecimal(a); @@ -993,12 +658,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#longValueExact() Long value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checked", - method = "longValueExact", - args = {} - ) public void test_LongValueExactNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -1014,12 +673,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#longValueExact() Long value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "ArithmeticException checked", - method = "longValueExact", - args = {} - ) public void test_LongValueExactPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -1035,12 +688,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#longValueExact() Long value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "ArithmeticException checked", - method = "longValueExact", - args = {} - ) public void test_LongValueExactFloatNeg() { BigDecimal aNumber = new BigDecimal("-9223372036854775807.99999"); try { @@ -1055,12 +702,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#longValueExact() Long value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "ArithmeticException checked", - method = "longValueExact", - args = {} - ) public void test_LongValueExactFloatPos() { float a = 9223372036854775806.99999F; BigDecimal aNumber = new BigDecimal(a); @@ -1076,12 +717,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValueExact() Convert pisitive BigDesimal * to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactPos() { int i = 127; BigDecimal bdNumber = new BigDecimal(i); @@ -1093,12 +728,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValueExact() Convert negative BigDesimal * to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactNeg() { String sNumber = "-127.56789"; int iNumber = -128; @@ -1114,12 +743,6 @@ public class BigDecimalConvertTest extends TestCase { * from char array to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactCharZero() { char[] cNumber = { '-', '0', '.', '0' @@ -1137,12 +760,6 @@ public class BigDecimalConvertTest extends TestCase { * from String to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactStringZero() { String sNumber = "00000000000000"; int iNumber = 0; @@ -1158,12 +775,6 @@ public class BigDecimalConvertTest extends TestCase { * from double to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactDoubleMax() { double dNumber = Double.MAX_VALUE; BigDecimal bdNumber = new BigDecimal(dNumber); @@ -1180,12 +791,6 @@ public class BigDecimalConvertTest extends TestCase { * from double to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactDoubleMin() { double dNumber = Double.MIN_VALUE; BigDecimal bdNumber = new BigDecimal(dNumber); @@ -1202,12 +807,6 @@ public class BigDecimalConvertTest extends TestCase { * from float to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactFloatPos() { float fNumber = 123.5445F; BigDecimal bdNumber = new BigDecimal(fNumber); @@ -1224,12 +823,6 @@ public class BigDecimalConvertTest extends TestCase { * from float to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactFloatNeg() { float fNumber = -12.987654321F; BigDecimal bdNumber = new BigDecimal(fNumber); @@ -1246,12 +839,6 @@ public class BigDecimalConvertTest extends TestCase { * from double to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactDouble() { double dNumber = 123.0000D; BigDecimal bdNumber = new BigDecimal(dNumber); @@ -1264,12 +851,6 @@ public class BigDecimalConvertTest extends TestCase { * from long to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactLongMin() { long lNumber = Long.MIN_VALUE; BigDecimal bdNumber = new BigDecimal(lNumber); @@ -1286,12 +867,6 @@ public class BigDecimalConvertTest extends TestCase { * from int to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for byteValueExact method", - method = "byteValueExact", - args = {} - ) public void test_ByteValueExactIntMax() { int iNumber = Integer.MAX_VALUE; BigDecimal bdNumber = new BigDecimal(iNumber); @@ -1307,11 +882,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert pisitive BigDesimal to * byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValuePos() { int i = 127; BigDecimal bdNumber = new BigDecimal(i); @@ -1323,11 +893,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert negative BigDesimal to * byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueNeg() { String sNumber = "-127.56789"; int iNumber = -128; @@ -1342,11 +907,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * char array to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueCharZero() { char[] cNumber = { '-', '0', '.', '0' @@ -1363,11 +923,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * String to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueStringZero() { String sNumber = "00000"; int iNumber = 0; @@ -1382,11 +937,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * double to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueDoubleMax() { double dNumber = Double.MAX_VALUE; BigDecimal bdNumber = new BigDecimal(dNumber); @@ -1399,11 +949,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * double to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueDoubleMin() { double dNumber = Double.MIN_VALUE; BigDecimal bdNumber = new BigDecimal(dNumber); @@ -1416,11 +961,6 @@ public class BigDecimalConvertTest extends TestCase { * @test_ java.math.BigDecimal#byteValue() Convert BigDesimal created from * float to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueFloatNeg() { float fNumber = -12.987654321F; byte bValue = -12; @@ -1433,11 +973,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * double to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueDouble() { double dNumber = 123.0000D; BigDecimal bdNumber = new BigDecimal(dNumber); @@ -1449,11 +984,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * long to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueLongMin() { long lNumber = Long.MIN_VALUE; int result = 0; @@ -1466,11 +996,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * int to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueIntMin() { int iNumber = Integer.MIN_VALUE; int result = 0; @@ -1483,11 +1008,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#byteValue() Convert BigDesimal created from * int to byte type */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "byteValue", - args = {} - ) public void test_ByteValueIntMax() { int iNumber = Integer.MAX_VALUE; int result = -1; @@ -1500,11 +1020,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValue() Short value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "shortValue", - args = {} - ) public void test_ShortValueNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -1516,11 +1031,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValue() Short value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "shortValue", - args = {} - ) public void test_ShortValuePos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -1532,12 +1042,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValueExact() Short value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shortValueExact method", - method = "shortValueExact", - args = {} - ) public void test_ShortValueExactNeg() { String a = "-123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -1553,12 +1057,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValueExact() Short value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shortValueExact method", - method = "shortValueExact", - args = {} - ) public void test_ShortValueExactPos() { String a = "123809648392384754573567356745735.63567890295784902768787678287E+21"; BigDecimal aNumber = new BigDecimal(a); @@ -1574,12 +1072,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValueExact() Short value of a negative * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shortValueExact method", - method = "shortValueExact", - args = {} - ) public void test_ShortValueExactFloatNeg() { BigDecimal aNumber = new BigDecimal("-32766.99999"); try { @@ -1594,12 +1086,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValueExact() Short value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shortValueExact method", - method = "shortValueExact", - args = {} - ) public void test_ShortValueExactFloatPos() { float a = 32767.99999F; BigDecimal aNumber = new BigDecimal(a); @@ -1615,12 +1101,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValueExact() Short value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shortValueExact method", - method = "shortValueExact", - args = {} - ) public void test_ShortValueExactLongPos() { long a = 12345L; BigDecimal aNumber = new BigDecimal(a); @@ -1632,12 +1112,6 @@ public class BigDecimalConvertTest extends TestCase { * @test java.math.BigDecimal#shortValueExact() Short value of a positive * BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shortValueExact method", - method = "shortValueExact", - args = {} - ) public void test_ShortValueExactLongNeg() { long a = -12345L; BigDecimal aNumber = new BigDecimal(a); @@ -1649,12 +1123,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#stripTrailingZeros() stripTrailingZeros() for * BigDecimal with zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for stripTrailingZeros method", - method = "stripTrailingZeros", - args = {} - ) public void test_stripTrailingZerosZeros() { BigDecimal bdNumber = new BigDecimal("0000000"); @@ -1677,12 +1145,6 @@ public class BigDecimalConvertTest extends TestCase { * @tests java.math.BigDecimal#stripTrailingZeros() stripTrailingZeros() for * positive BigDecimal */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for stripTrailingZeros method", - method = "stripTrailingZeros", - args = {} - ) public void test_stripTrailingZeros() { String s = "00000000100000000100000000.000000000100000000"; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalScaleOperationsTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalScaleOperationsTest.java index 17c9a26..aa91f08 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalScaleOperationsTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigDecimalScaleOperationsTest.java @@ -21,17 +21,11 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.KnownFailure; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; - import junit.framework.TestCase; import java.math.BigDecimal; import java.math.BigInteger; import java.math.RoundingMode; -@TestTargetClass(BigDecimal.class) /** * Class: java.math.BigDecimal * Methods: movePointLeft, movePointRight, scale, setScale, unscaledValue * @@ -40,12 +34,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Check the default scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for scale method.", - method = "scale", - args = {} - ) public void testScaleDefault() { String a = "1231212478987482988429808779810457634781384756794987"; int cScale = 0; @@ -56,12 +44,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Check a negative scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for scale method.", - method = "scale", - args = {} - ) public void testScaleNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = -10; @@ -73,12 +55,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Check a positive scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for scale method.", - method = "scale", - args = {} - ) public void testScalePos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 10; @@ -90,12 +66,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Check the zero scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for scale method.", - method = "scale", - args = {} - ) public void testScaleZero() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 0; @@ -107,12 +77,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Check the unscaled value */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "unscaledValue", - args = {} - ) public void testUnscaledValue() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 100; @@ -124,12 +88,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a greater new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setScale method.", - method = "setScale", - args = {int.class} - ) public void testSetScaleGreater() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 18; @@ -143,12 +101,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a less new scale; this.scale == 8; newScale == 5. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setScale method.", - method = "setScale", - args = {int.class} - ) public void testSetScaleLess() { String a = "2.345726458768760000E+10"; int newScale = 5; @@ -161,12 +113,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Verify an exception when setting a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setScale method.", - method = "setScale", - args = {int.class} - ) public void testSetScaleException() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 28; @@ -183,12 +129,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set the same new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setScale method.", - method = "setScale", - args = {int.class} - ) public void testSetScaleSame() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 18; @@ -202,12 +142,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundUp() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478139"; @@ -222,12 +156,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundDown() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478138"; @@ -242,12 +170,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundCeiling() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478139"; @@ -262,12 +184,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundFloor() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478138"; @@ -282,12 +198,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundHalfUp() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478138"; @@ -302,12 +212,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundHalfDown() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478138"; @@ -322,12 +226,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Set a new scale */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleRoundHalfEven() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478138"; @@ -342,12 +240,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * SetScale(int, RoundingMode) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checking missed.", - method = "setScale", - args = {int.class, int.class} - ) public void testSetScaleIntRoundingMode() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 28; @@ -363,11 +255,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Move the decimal point to the left; the shift value is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "movePointLeft", - args = {int.class} - ) public void testMovePointLeftPos() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 28; @@ -382,11 +269,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Move the decimal point to the left; the shift value is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "movePointLeft", - args = {int.class} - ) public void testMovePointLeftNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 28; @@ -398,11 +280,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { assertTrue("incorrect value", bNumber.unscaledValue().toString().equals(a)); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "movePointLeft", - args = {int.class} - ) public void testMovePointLeftEx() { BigDecimal a = new BigDecimal("12345.6789012345678901234567890123456789"); BigDecimal res = a.movePointLeft(10); @@ -423,12 +300,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Move the decimal point to the right; the shift value is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for movePointRight method.", - method = "movePointRight", - args = {int.class} - ) public void testMovePointRightPosGreater() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 28; @@ -443,12 +314,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Move the decimal point to the right; the shift value is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for movePointRight method.", - method = "movePointRight", - args = {int.class} - ) public void testMovePointRightPosLess() { String a = "1231212478987482988429808779810457634781384756794987"; String b = "123121247898748298842980877981045763478138475679498700"; @@ -464,12 +329,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Move the decimal point to the right; the shift value is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for movePointRight method.", - method = "movePointRight", - args = {int.class} - ) public void testMovePointRightNeg() { String a = "1231212478987482988429808779810457634781384756794987"; int aScale = 28; @@ -484,12 +343,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * Move the decimal point to the right when the scale overflows */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for movePointRight method.", - method = "movePointRight", - args = {int.class} - ) public void testMovePointRightException() { String a = "12312124789874829887348723648726347429808779810457634781384756794987"; int aScale = Integer.MAX_VALUE; //2147483647 @@ -503,11 +356,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "movePointRight", - args = {int.class} - ) public void testMovePointRightEx() { BigDecimal a = new BigDecimal("12345.6789012345678901234567890123456789"); BigDecimal res = a.movePointRight(10); @@ -524,12 +372,7 @@ public class BigDecimalScaleOperationsTest extends TestCase { } } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "movePointRight", - args = {int.class} - ) - @KnownFailure("Throws OutOfMemoryError instead of ArithmeticException!") + // Throws OutOfMemoryError instead of ArithmeticException! public void testMovePointRightEx2() { BigDecimal a = new BigDecimal("123456789012345678901234567890123456789E25"); try { @@ -543,11 +386,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * scaleByPowerOfTen(int n) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - method = "scaleByPowerOfTen", - args = {int.class} - ) public void testScaleByPowerOfTenEx() { BigDecimal a = new BigDecimal("12345.6789012345678901234567890123456789"); BigDecimal res = a.movePointRight(10); @@ -577,12 +415,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { /** * precision() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "precision", - args = {} - ) public void testPrecision() { String a = "12312124789874829887348723648726347429808779810457634781384756794987"; int aScale = 14; @@ -597,12 +429,6 @@ public class BigDecimalScaleOperationsTest extends TestCase { * check that setScale with a scale greater to the existing scale does not * change the value. */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "precision", - args = {} - ) public void testSetScale() { BigDecimal x1 = new BigDecimal(1.23400); BigDecimal x2 = x1.setScale(75); diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAddTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAddTest.java index e7041fc..e3129cc 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAddTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAddTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: add @@ -38,12 +33,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add two positive numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase1() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -64,12 +53,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add two negative numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase2() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -92,12 +75,6 @@ public class BigIntegerAddTest extends TestCase { * The first one is positive and the second is negative. * The first one is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase3() { byte aBytes[] = {3, 4, 5, 6, 7, 8, 9}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7}; @@ -120,12 +97,6 @@ public class BigIntegerAddTest extends TestCase { * The first one is negative and the second is positive. * The first one is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase4() { byte aBytes[] = {3, 4, 5, 6, 7, 8, 9}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7}; @@ -148,12 +119,6 @@ public class BigIntegerAddTest extends TestCase { * The first is positive and the second is negative. * The first is less in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase5() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {3, 4, 5, 6, 7, 8, 9}; @@ -176,12 +141,6 @@ public class BigIntegerAddTest extends TestCase { * The first one is negative and the second is positive. * The first one is less in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase6() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {3, 4, 5, 6, 7, 8, 9}; @@ -203,12 +162,6 @@ public class BigIntegerAddTest extends TestCase { * Add two positive numbers of different length. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase7() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -230,12 +183,6 @@ public class BigIntegerAddTest extends TestCase { * Add two positive numbers of different length. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase8() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -255,12 +202,6 @@ public class BigIntegerAddTest extends TestCase { * Add two negative numbers of different length. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase9() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -282,12 +223,6 @@ public class BigIntegerAddTest extends TestCase { * Add two negative numbers of different length. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase10() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -310,12 +245,6 @@ public class BigIntegerAddTest extends TestCase { * The first is positive. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase11() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -338,12 +267,6 @@ public class BigIntegerAddTest extends TestCase { * The first is positive. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase12() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -366,12 +289,6 @@ public class BigIntegerAddTest extends TestCase { * The first is negative. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase13() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -394,12 +311,6 @@ public class BigIntegerAddTest extends TestCase { * The first is negative. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase14() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -420,12 +331,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add two equal numbers of different signs */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase15() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7}; @@ -445,12 +350,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add zero to a number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase16() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {0}; @@ -471,12 +370,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add a number to zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase17() { byte aBytes[] = {0}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7}; @@ -497,12 +390,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add zero to zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase18() { byte aBytes[] = {0}; byte bBytes[] = {0}; @@ -523,12 +410,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add ZERO to a number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase19() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte rBytes[] = {1, 2, 3, 4, 5, 6, 7}; @@ -547,12 +428,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add a number to zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase20() { byte bBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte rBytes[] = {1, 2, 3, 4, 5, 6, 7}; @@ -571,12 +446,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add ZERO to ZERO */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase21() { byte rBytes[] = {0}; BigInteger aNumber = BigInteger.ZERO; @@ -593,12 +462,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add ONE to ONE */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase22() { byte rBytes[] = {2}; BigInteger aNumber = BigInteger.ONE; @@ -615,12 +478,6 @@ public class BigIntegerAddTest extends TestCase { /** * Add two numbers so that carry is 1 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for add method.", - method = "add", - args = {java.math.BigInteger.class} - ) public void testCase23() { byte aBytes[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; byte bBytes[] = {-1, -1, -1, -1, -1, -1, -1, -1}; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAndTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAndTest.java index 6dc96e9..fb1f9db 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAndTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerAndTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: and @@ -38,12 +33,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for zero and a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testZeroPos() { byte aBytes[] = {0}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -64,12 +53,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for zero and a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testZeroNeg() { byte aBytes[] = {0}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -90,12 +73,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for a positive number and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosZero() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {0}; @@ -116,12 +93,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for a negative number and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegPos() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {0}; @@ -142,12 +113,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for zero and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testZeroZero() { byte aBytes[] = {0}; byte bBytes[] = {0}; @@ -168,12 +133,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for zero and one */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testZeroOne() { BigInteger aNumber = BigInteger.ZERO; BigInteger bNumber = BigInteger.ONE; @@ -185,12 +144,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for one and one */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testOneOne() { BigInteger aNumber = BigInteger.ONE; BigInteger bNumber = BigInteger.ONE; @@ -202,12 +155,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two positive numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosPosSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -228,12 +175,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosPosFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -254,12 +195,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two positive numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosPosFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -280,12 +215,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two negative numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegNegSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -306,12 +235,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegNegFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -332,12 +255,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two negative numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegNegFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -358,12 +275,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two numbers of different signs and the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosNegSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -384,12 +295,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for two numbers of different signs and the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegPosSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -410,12 +315,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for a negative and a positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -436,12 +335,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for a negative and a positive numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -462,12 +355,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for a positive and a negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosNegFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -488,12 +375,6 @@ public class BigIntegerAndTest extends TestCase { /** * And for a positive and a negative numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testPosNegFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -514,12 +395,6 @@ public class BigIntegerAndTest extends TestCase { /** * Test for a special case */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testSpecialCase1() { byte aBytes[] = {-1, -1, -1, -1}; byte bBytes[] = {5, -4, -3, -2}; @@ -540,12 +415,6 @@ public class BigIntegerAndTest extends TestCase { /** * Test for a special case */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for and method.", - method = "and", - args = {java.math.BigInteger.class} - ) public void testSpecialCase2() { byte aBytes[] = {-51}; byte bBytes[] = {-52, -51, -50, -49, -48}; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerCompareTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerCompareTest.java index ef982cb..bfd1070 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerCompareTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerCompareTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Methods: abs, compareTo, equals, max, min, negate, signum @@ -38,12 +33,6 @@ public class BigIntegerCompareTest extends TestCase { /** * abs() for a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for abs method.", - method = "abs", - args = {} - ) public void testAbsPositive() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; int aSign = 1; @@ -61,12 +50,6 @@ public class BigIntegerCompareTest extends TestCase { /** * abs() for a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for abs method.", - method = "abs", - args = {} - ) public void testAbsNegative() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; int aSign = -1; @@ -86,12 +69,6 @@ public class BigIntegerCompareTest extends TestCase { * Compare two positive numbers. * The first is greater. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToPosPos1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -107,12 +84,6 @@ public class BigIntegerCompareTest extends TestCase { * Compare two positive numbers. * The first is less. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToPosPos2() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -127,12 +98,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare two equal positive numbers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToEqualPos() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -148,12 +113,6 @@ public class BigIntegerCompareTest extends TestCase { * Compare two negative numbers. * The first is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToNegNeg1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -169,12 +128,6 @@ public class BigIntegerCompareTest extends TestCase { * Compare two negative numbers. * The first is less in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareNegNeg2() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -189,12 +142,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare two equal negative numbers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToEqualNeg() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -210,12 +157,6 @@ public class BigIntegerCompareTest extends TestCase { * Compare two numbers of different signs. * The first is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToDiffSigns1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -231,12 +172,6 @@ public class BigIntegerCompareTest extends TestCase { * Compare two numbers of different signs. * The first is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToDiffSigns2() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -251,12 +186,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare a positive number to ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToPosZero() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -269,12 +198,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare ZERO to a positive number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToZeroPos() { byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int bSign = 1; @@ -287,12 +210,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare a negative number to ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToNegZero() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = -1; @@ -305,12 +222,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare ZERO to a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToZeroNeg() { byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int bSign = -1; @@ -323,12 +234,6 @@ public class BigIntegerCompareTest extends TestCase { * compareTo(BigInteger a). * Compare ZERO to ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for compareTo method.", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void testCompareToZeroZero() { BigInteger aNumber = BigInteger.ZERO; BigInteger bNumber = BigInteger.ZERO; @@ -339,12 +244,6 @@ public class BigIntegerCompareTest extends TestCase { * equals(Object obj). * obj is not a BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsObject() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -356,12 +255,6 @@ public class BigIntegerCompareTest extends TestCase { /** * equals(null). */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsNull() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -374,12 +267,6 @@ public class BigIntegerCompareTest extends TestCase { * obj is a BigInteger. * numbers are equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsBigIntegerTrue() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -395,12 +282,6 @@ public class BigIntegerCompareTest extends TestCase { * obj is a BigInteger. * numbers are not equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for equals method.", - method = "equals", - args = {java.lang.Object.class} - ) public void testEqualsBigIntegerFalse() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; @@ -415,12 +296,6 @@ public class BigIntegerCompareTest extends TestCase { * max(BigInteger val). * the first is greater. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigInteger.class} - ) public void testMaxGreater() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; @@ -442,12 +317,6 @@ public class BigIntegerCompareTest extends TestCase { * max(BigInteger val). * the first is less. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigInteger.class} - ) public void testMaxLess() { byte aBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -469,12 +338,6 @@ public class BigIntegerCompareTest extends TestCase { * max(BigInteger val). * numbers are equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigInteger.class} - ) public void testMaxEqual() { byte aBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; @@ -496,12 +359,6 @@ public class BigIntegerCompareTest extends TestCase { * max(BigInteger val). * max of negative and ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for max method.", - method = "max", - args = {java.math.BigInteger.class} - ) public void testMaxNegZero() { byte aBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; int aSign = -1; @@ -521,12 +378,6 @@ public class BigIntegerCompareTest extends TestCase { * min(BigInteger val). * the first is greater. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mix method.", - method = "min", - args = {java.math.BigInteger.class} - ) public void testMinGreater() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; @@ -548,12 +399,6 @@ public class BigIntegerCompareTest extends TestCase { * min(BigInteger val). * the first is less. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mix method.", - method = "min", - args = {java.math.BigInteger.class} - ) public void testMinLess() { byte aBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -575,12 +420,6 @@ public class BigIntegerCompareTest extends TestCase { * min(BigInteger val). * numbers are equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mix method.", - method = "min", - args = {java.math.BigInteger.class} - ) public void testMinEqual() { byte aBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; byte bBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; @@ -602,12 +441,6 @@ public class BigIntegerCompareTest extends TestCase { * max(BigInteger val). * min of positive and ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mix method.", - method = "min", - args = {java.math.BigInteger.class} - ) public void testMinPosZero() { byte aBytes[] = {45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -626,12 +459,6 @@ public class BigIntegerCompareTest extends TestCase { /** * negate() a positive number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for negate method.", - method = "negate", - args = {} - ) public void testNegatePositive() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -649,12 +476,6 @@ public class BigIntegerCompareTest extends TestCase { /** * negate() a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for negate method.", - method = "negate", - args = {} - ) public void testNegateNegative() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = -1; @@ -672,12 +493,6 @@ public class BigIntegerCompareTest extends TestCase { /** * negate() ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for negate method.", - method = "negate", - args = {} - ) public void testNegateZero() { byte rBytes[] = {0}; BigInteger aNumber = BigInteger.ZERO; @@ -693,12 +508,6 @@ public class BigIntegerCompareTest extends TestCase { /** * signum() of a positive number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for signum method.", - method = "signum", - args = {} - ) public void testSignumPositive() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -709,12 +518,6 @@ public class BigIntegerCompareTest extends TestCase { /** * signum() of a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for signum method.", - method = "signum", - args = {} - ) public void testSignumNegative() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = -1; @@ -725,12 +528,6 @@ public class BigIntegerCompareTest extends TestCase { /** * signum() of ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for signum method.", - method = "signum", - args = {} - ) public void testSignumZero() { BigInteger aNumber = BigInteger.ZERO; assertEquals("incorrect sign", 0, aNumber.signum()); diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConstructorsTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConstructorsTest.java index 043d278..1835d68 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConstructorsTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConstructorsTest.java @@ -21,16 +21,11 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import java.util.Random; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Constructors: BigInteger(byte[] a), BigInteger(int sign, byte[] a), @@ -41,12 +36,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from an array of bytes. * Verify an exception thrown if an array is zero bytes long */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesException() { byte aBytes[] = {}; try { @@ -61,12 +50,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a positive number from an array of bytes. * The number fits in an array of integers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesPositive1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte rBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -83,12 +66,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a positive number from an array of bytes. * The number fits in an integer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesPositive2() { byte aBytes[] = {12, 56, 100}; byte rBytes[] = {12, 56, 100}; @@ -105,12 +82,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a positive number from an array of bytes. * The number of bytes is 4. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesPositive3() { byte aBytes[] = {127, 56, 100, -1}; byte rBytes[] = {127, 56, 100, -1}; @@ -127,12 +98,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a positive number from an array of bytes. * The number of bytes is multiple of 4. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesPositive() { byte aBytes[] = {127, 56, 100, -1, 14, 75, -24, -100}; byte rBytes[] = {127, 56, 100, -1, 14, 75, -24, -100}; @@ -149,12 +114,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a negative number from an array of bytes. * The number fits in an array of integers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesNegative1() { byte aBytes[] = {-12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; byte rBytes[] = {-12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; @@ -171,12 +130,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a negative number from an array of bytes. * The number fits in an integer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesNegative2() { byte aBytes[] = {-12, 56, 100}; byte rBytes[] = {-12, 56, 100}; @@ -193,12 +146,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a negative number from an array of bytes. * The number of bytes is 4. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesNegative3() { byte aBytes[] = {-128, -12, 56, 100}; byte rBytes[] = {-128, -12, 56, 100}; @@ -215,12 +162,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a negative number from an array of bytes. * The number of bytes is multiple of 4. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesNegative4() { byte aBytes[] = {-128, -12, 56, 100, -13, 56, 93, -78}; byte rBytes[] = {-128, -12, 56, 100, -13, 56, 93, -78}; @@ -236,12 +177,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a zero number from an array of zero bytes. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(byte[]) constructor.", - method = "BigInteger", - args = {byte[].class} - ) public void testConstructorBytesZero() { byte aBytes[] = {0, 0, 0, -0, +0, 0, -0}; byte rBytes[] = {0}; @@ -258,12 +193,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from a sign and an array of bytes. * Verify an exception thrown if a sign has improper value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesException1() { byte aBytes[] = {123, 45, -3, -76}; int aSign = 3; @@ -279,12 +208,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from a sign and an array of bytes. * Verify an exception thrown if the array contains non-zero bytes while the sign is 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesException2() { byte aBytes[] = {123, 45, -3, -76}; int aSign = 0; @@ -301,12 +224,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number fits in an array of integers. * The most significant byte is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15}; int aSign = 1; @@ -325,12 +242,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number fits in an array of integers. * The most significant byte is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive2() { byte aBytes[] = {-12, 56, 100, -2, -76, 89, 45, 91, 3, -15}; int aSign = 1; @@ -348,12 +259,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a positive number from a sign and an array of bytes. * The number fits in an integer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive3() { byte aBytes[] = {-12, 56, 100}; int aSign = 1; @@ -372,12 +277,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is 4. * The most significant byte is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive4() { byte aBytes[] = {127, 56, 100, -2}; int aSign = 1; @@ -396,12 +295,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is 4. * The most significant byte is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive5() { byte aBytes[] = {-127, 56, 100, -2}; int aSign = 1; @@ -420,12 +313,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is multiple of 4. * The most significant byte is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive6() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 23, -101}; int aSign = 1; @@ -444,12 +331,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is multiple of 4. * The most significant byte is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesPositive7() { byte aBytes[] = {-12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 23, -101}; int aSign = 1; @@ -468,12 +349,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number fits in an array of integers. * The most significant byte is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15}; int aSign = -1; @@ -492,12 +367,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number fits in an array of integers. * The most significant byte is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative2() { byte aBytes[] = {-12, 56, 100, -2, -76, 89, 45, 91, 3, -15}; int aSign = -1; @@ -515,12 +384,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a negative number from a sign and an array of bytes. * The number fits in an integer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative3() { byte aBytes[] = {-12, 56, 100}; int aSign = -1; @@ -539,12 +402,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is 4. * The most significant byte is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative4() { byte aBytes[] = {127, 56, 100, -2}; int aSign = -1; @@ -563,12 +420,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is 4. * The most significant byte is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative5() { byte aBytes[] = {-127, 56, 100, -2}; int aSign = -1; @@ -587,12 +438,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is multiple of 4. * The most significant byte is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative6() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 23, -101}; int aSign = -1; @@ -611,12 +456,6 @@ public class BigIntegerConstructorsTest extends TestCase { * The number of bytes is multiple of 4. * The most significant byte is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesNegative7() { byte aBytes[] = {-12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 23, -101}; int aSign = -1; @@ -634,12 +473,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a zero number from a sign and an array of zero bytes. * The sign is -1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesZero1() { byte aBytes[] = {-0, 0, +0, 0, 0, 00, 000}; int aSign = -1; @@ -657,12 +490,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a zero number from a sign and an array of zero bytes. * The sign is 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesZero2() { byte aBytes[] = {-0, 0, +0, 0, 0, 00, 000}; int aSign = 0; @@ -680,12 +507,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a zero number from a sign and an array of zero bytes. * The sign is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesZero3() { byte aBytes[] = {-0, 0, +0, 0, 0, 00, 000}; int aSign = 1; @@ -703,12 +524,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a zero number from a sign and an array of zero length. * The sign is -1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesZeroNull1() { byte aBytes[] = {}; int aSign = -1; @@ -726,12 +541,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a zero number from a sign and an array of zero length. * The sign is 0. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesZeroNull2() { byte aBytes[] = {}; int aSign = 0; @@ -749,12 +558,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a zero number from a sign and an array of zero length. * The sign is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(int, byte[]) constructor.", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void testConstructorSignBytesZeroNull3() { byte aBytes[] = {}; int aSign = 1; @@ -772,12 +575,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from a string value and radix. * Verify an exception thrown if a radix is out of range */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringException1() { String value = "9234853876401"; int radix = 45; @@ -793,12 +590,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from a string value and radix. * Verify an exception thrown if the string starts with a space. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringException2() { String value = " 9234853876401"; int radix = 10; @@ -813,12 +604,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from a string value and radix. * Verify an exception thrown if the string contains improper characters. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringException3() { String value = "92348$*#78987"; int radix = 34; @@ -833,12 +618,6 @@ public class BigIntegerConstructorsTest extends TestCase { * Create a number from a string value and radix. * Verify an exception thrown if some digits are greater than radix. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringException4() { String value = "98zv765hdsaiy"; int radix = 20; @@ -852,12 +631,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a positive number from a string value and radix 2. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix2() { String value = "10101010101010101"; int radix = 2; @@ -874,12 +647,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a positive number from a string value and radix 8. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix8() { String value = "76356237071623450"; int radix = 8; @@ -896,12 +663,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a positive number from a string value and radix 10. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix10() { String value = "987328901348934898"; int radix = 10; @@ -918,12 +679,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a positive number from a string value and radix 16. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix16() { String value = "fe2340a8b5ce790"; int radix = 16; @@ -940,12 +695,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a positive number from a string value and radix 36. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix36() { String value = "skdjgocvhdjfkl20jndjkf347ejg457"; int radix = 36; @@ -962,12 +711,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a negative number from a string value and radix 10. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix10Negative() { String value = "-234871376037"; int radix = 36; @@ -984,12 +727,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a zero number from a string value and radix 36. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String, int) constructor.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void testConstructorStringRadix10Zero() { String value = "-00000000000000"; int radix = 10; @@ -1006,12 +743,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a random number of 75 bits length. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "IllegalArgumentException checking missed for negative number of bits.", - method = "BigInteger", - args = {int.class, java.util.Random.class} - ) public void testConstructorRandom() { int bitLen = 75; Random rnd = new Random(); @@ -1022,12 +753,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * Create a prime number of 25 bits length. */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed for incorrect bitLength parameter.", - method = "BigInteger", - args = {int.class, int.class, java.util.Random.class} - ) public void testConstructorPrime() { int bitLen = 25; Random rnd = new Random(); @@ -1058,12 +783,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrString1() { String s = "0"; BigInteger bi_s = new BigInteger(s); @@ -1074,12 +793,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrString2() { String s = "-2147483648"; BigInteger bi_s = new BigInteger(s); @@ -1091,12 +804,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrString3() { String s = "2147483647"; BigInteger bi_s = new BigInteger(s); @@ -1108,12 +815,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrStringExc1() { try { new BigInteger("01234 56"); @@ -1125,12 +826,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrStringExc2() { try { new BigInteger("1234#56"); @@ -1142,12 +837,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrStringExc3() { try { new BigInteger("1234.56"); @@ -1159,12 +848,6 @@ public class BigIntegerConstructorsTest extends TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for BigInteger(String) constructor.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstrStringExc4() { try { new BigInteger("1E+1"); diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConvertTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConvertTest.java index aaef132..c0f17b1 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConvertTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerConvertTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Methods: intValue, longValue, toByteArray(), valueOf(long val), @@ -39,12 +34,6 @@ public class BigIntegerConvertTest extends TestCase { /** * Return the double value of ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueZero() { String a = "0"; double result = 0.0; @@ -56,12 +45,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a double value. * The number's length is less than 64 bits. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePositive1() { String a = "27467238945"; double result = 2.7467238945E10; @@ -73,12 +56,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a double value. * The number's bit length is inside [63, 1024]. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePositive2() { String a = "2746723894572364578265426346273456972"; double result = 2.7467238945723645E36; @@ -90,12 +67,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a double value. * The number's bit length is less than 64 bits. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegative1() { String a = "-27467238945"; double result = -2.7467238945E10; @@ -107,12 +78,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a double value. * The number's bit length is inside [63, 1024]. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegative2() { String a = "-2746723894572364578265426346273456972"; double result = -2.7467238945723645E36; @@ -125,12 +90,6 @@ public class BigIntegerConvertTest extends TestCase { * Rounding is needed. * The rounding bit is 1 and the next bit to the left is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePosRounded1() { byte[] a = {-128, 1, 2, 3, 4, 5, 60, 23, 1, -3, -5}; int aSign = 1; @@ -145,12 +104,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 1 and the next bit to the left is 0 * but some of dropped bits are 1s. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePosRounded2() { byte[] a = {-128, 1, 2, 3, 4, 5, 36, 23, 1, -3, -5}; int aSign = 1; @@ -162,12 +115,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a double value. * Rounding is NOT needed. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePosNotRounded() { byte[] a = {-128, 1, 2, 3, 4, 5, -128, 23, 1, -3, -5}; int aSign = 1; @@ -180,12 +127,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a double value. * Rounding is needed. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegRounded1() { byte[] a = {-128, 1, 2, 3, 4, 5, 60, 23, 1, -3, -5}; int aSign = -1; @@ -200,12 +141,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 1 and the next bit to the left is 0 * but some of dropped bits are 1s. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegRounded2() { byte[] a = {-128, 1, 2, 3, 4, 5, 36, 23, 1, -3, -5}; int aSign = -1; @@ -218,12 +153,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a double value. * Rounding is NOT needed. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegNotRounded() { byte[] a = {-128, 1, 2, 3, 4, 5, -128, 23, 1, -3, -5}; int aSign = -1; @@ -238,12 +167,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 0. * The result is Double.MAX_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePosMaxValue() { byte[] a = {0, -1, -1, -1, -1, -1, -1, -8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -264,12 +187,6 @@ public class BigIntegerConvertTest extends TestCase { * The exponent is 1023 and the mantissa is all 1s. * The result is -Double.MAX_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegMaxValue() { byte[] a = {0, -1, -1, -1, -1, -1, -1, -8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -291,12 +208,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 1. * The result is Double.POSITIVE_INFINITY. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePositiveInfinity1() { byte[] a = {-1, -1, -1, -1, -1, -1, -1, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -316,12 +227,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a double value. * The number's bit length is greater than 1024. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePositiveInfinity2() { String a = "2746723894572364578265426346273456972283746872364768676747462342342342342342342342323423423423423423426767456345745293762384756238475634563456845634568934568347586346578648576478568456457634875673845678456786587345873645767456834756745763457863485768475678465783456702897830296720476846578634576384567845678346573465786457863"; double aNumber = new BigInteger(a).doubleValue(); @@ -332,12 +237,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a double value. * The number's bit length is greater than 1024. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegativeInfinity1() { String a = "-2746723894572364578265426346273456972283746872364768676747462342342342342342342342323423423423423423426767456345745293762384756238475634563456845634568934568347586346578648576478568456457634875673845678456786587345873645767456834756745763457863485768475678465783456702897830296720476846578634576384567845678346573465786457863"; double aNumber = new BigInteger(a).doubleValue(); @@ -350,12 +249,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 0. * The result is Double.NEGATIVE_INFINITY. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegativeInfinity2() { byte[] a = {-1, -1, -1, -1, -1, -1, -1, -8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -376,12 +269,6 @@ public class BigIntegerConvertTest extends TestCase { * The exponent is 1023 and the mantissa is all 0s * but the 54th bit (implicit) is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValuePosMantissaIsZero() { byte[] a = {-128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -403,12 +290,6 @@ public class BigIntegerConvertTest extends TestCase { * The exponent is 1023 and the mantissa is all 0s * but the 54th bit (implicit) is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for doubleValue method.", - method = "doubleValue", - args = {} - ) public void testDoubleValueNegMantissaIsZero() { byte[] a = {-128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -427,12 +308,6 @@ public class BigIntegerConvertTest extends TestCase { /** * Return the float value of ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueZero() { String a = "0"; float result = 0.0f; @@ -444,12 +319,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a float value. * The number's length is less than 32 bits. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePositive1() { String a = "27467238"; float result = 2.7467238E7f; @@ -461,12 +330,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a float value. * The number's bit length is inside [32, 127]. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePositive2() { String a = "27467238945723645782"; float result = 2.7467239E19f; @@ -478,12 +341,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a float value. * The number's bit length is less than 32 bits. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegative1() { String a = "-27467238"; float result = -2.7467238E7f; @@ -495,12 +352,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a doufloatble value. * The number's bit length is inside [63, 1024]. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegative2() { String a = "-27467238945723645782"; float result = -2.7467239E19f; @@ -513,12 +364,6 @@ public class BigIntegerConvertTest extends TestCase { * Rounding is needed. * The rounding bit is 1 and the next bit to the left is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePosRounded1() { byte[] a = {-128, 1, -1, -4, 4, 5, 60, 23, 1, -3, -5}; int aSign = 1; @@ -533,12 +378,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 1 and the next bit to the left is 0 * but some of dropped bits are 1s. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePosRounded2() { byte[] a = {-128, 1, 2, -128, 4, 5, 60, 23, 1, -3, -5}; int aSign = 1; @@ -550,12 +389,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a float value. * Rounding is NOT needed. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePosNotRounded() { byte[] a = {-128, 1, 2, 3, 4, 5, 60, 23, 1, -3, -5}; int aSign = 1; @@ -568,12 +401,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a float value. * Rounding is needed. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegRounded1() { byte[] a = {-128, 1, -1, -4, 4, 5, 60, 23, 1, -3, -5}; int aSign = -1; @@ -588,12 +415,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 1 and the next bit to the left is 0 * but some of dropped bits are 1s. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegRounded2() { byte[] a = {-128, 1, 2, -128, 4, 5, 60, 23, 1, -3, -5}; int aSign = -1; @@ -606,12 +427,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a float value. * Rounding is NOT needed. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegNotRounded() { byte[] a = {-128, 1, 2, 3, 4, 5, 60, 23, 1, -3, -5}; int aSign = -1; @@ -626,12 +441,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 0. * The result is Float.MAX_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePosMaxValue() { byte[] a = {0, -1, -1, -1, 0, -1, -1, -8, -1, -1, -1, -1, -1, -1, -1, -1, -1}; int aSign = 1; @@ -645,12 +454,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 0. * The result is -Float.MAX_VALUE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegMaxValue() { byte[] a = {0, -1, -1, -1, 0, -1, -1, -8, -1, -1, -1, -1, -1, -1, -1, -1, -1}; int aSign = -1; @@ -664,12 +467,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 1. * The result is Float.POSITIVE_INFINITY. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePositiveInfinity1() { byte[] a = {0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; int aSign = 1; @@ -681,12 +478,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive number to a float value. * The number's bit length is greater than 127. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePositiveInfinity2() { String a = "2746723894572364578265426346273456972283746872364768676747462342342342342342342342323423423423423423426767456345745293762384756238475634563456845634568934568347586346578648576478568456457634875673845678456786587345873645767456834756745763457863485768475678465783456702897830296720476846578634576384567845678346573465786457863"; float aNumber = new BigInteger(a).floatValue(); @@ -697,12 +488,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a float value. * The number's bit length is greater than 127. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegativeInfinity1() { String a = "-2746723894572364578265426346273456972283746872364768676747462342342342342342342342323423423423423423426767456345745293762384756238475634563456845634568934568347586346578648576478568456457634875673845678456786587345873645767456834756745763457863485768475678465783456702897830296720476846578634576384567845678346573465786457863"; float aNumber = new BigInteger(a).floatValue(); @@ -715,12 +500,6 @@ public class BigIntegerConvertTest extends TestCase { * The rounding bit is 0. * The result is Float.NEGATIVE_INFINITY. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegativeInfinity2() { byte[] a = {0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}; int aSign = -1; @@ -733,12 +512,6 @@ public class BigIntegerConvertTest extends TestCase { * The exponent is 1023 and the mantissa is all 0s * but the 54th bit (implicit) is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValuePosMantissaIsZero() { byte[] a = {-128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = 1; @@ -752,12 +525,6 @@ public class BigIntegerConvertTest extends TestCase { * The exponent is 1023 and the mantissa is all 0s * but the 54th bit (implicit) is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueNegMantissaIsZero() { byte[] a = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; @@ -769,12 +536,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative number to a float value. * The number's bit length is less than 32 bits. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for floatValue method.", - method = "floatValue", - args = {} - ) public void testFloatValueBug2482() { String a = "2147483649"; float result = 2.14748365E9f; @@ -786,12 +547,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive BigInteger to an integer value. * The low digit is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValuePositive1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3}; int resInt = 1496144643; @@ -803,12 +558,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive BigInteger to an integer value. * The low digit is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValuePositive2() { byte aBytes[] = {12, 56, 100}; int resInt = 800868; @@ -820,12 +569,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a positive BigInteger to an integer value. * The low digit is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValuePositive3() { byte aBytes[] = {56, 13, 78, -12, -5, 56, 100}; int sign = 1; @@ -838,12 +581,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative BigInteger to an integer value. * The low digit is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValueNegative1() { byte aBytes[] = {12, 56, 100, -2, -76, -128, 45, 91, 3}; int sign = -1; @@ -856,12 +593,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative BigInteger to an integer value. * The low digit is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValueNegative2() { byte aBytes[] = {-12, 56, 100}; int result = -771996; @@ -873,12 +604,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a negative BigInteger to an integer value. * The low digit is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for intValue method.", - method = "intValue", - args = {} - ) public void testIntValueNegative3() { byte aBytes[] = {12, 56, 100, -2, -76, 127, 45, 91, 3}; int sign = -1; @@ -891,12 +616,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a BigInteger to a positive long value * The BigInteger is longer than int. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for longValue method.", - method = "longValue", - args = {} - ) public void testLongValuePositive1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, 120, -34, -12, 45, 98}; long result = 3268209772258930018L; @@ -908,12 +627,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a number to a positive long value * The number fits in a long. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for longValue method.", - method = "longValue", - args = {} - ) public void testLongValuePositive2() { byte aBytes[] = {12, 56, 100, 18, -105, 34, -18, 45}; long result = 880563758158769709L; @@ -925,12 +638,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a number to a negative long value * The BigInteger is longer than int. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for longValue method.", - method = "longValue", - args = {} - ) public void testLongValueNegative1() { byte aBytes[] = {12, -1, 100, -2, -76, -128, 45, 91, 3}; long result = -43630045168837885L; @@ -942,12 +649,6 @@ public class BigIntegerConvertTest extends TestCase { * Convert a number to a negative long value * The number fits in a long. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for longValue method.", - method = "longValue", - args = {} - ) public void testLongValueNegative2() { byte aBytes[] = {-12, 56, 100, 45, -101, 45, 98}; long result = -3315696807498398L; @@ -958,12 +659,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert Integer.MAX_VALUE to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfIntegerMax() { long longVal = Integer.MAX_VALUE; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -979,12 +674,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert Integer.MIN_VALUE to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfIntegerMin() { long longVal = Integer.MIN_VALUE; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1000,12 +689,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert Long.MAX_VALUE to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongMax() { long longVal = Long.MAX_VALUE; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1021,12 +704,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert Long.MIN_VALUE to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongMin() { long longVal = Long.MIN_VALUE; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1042,12 +719,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert a positive long value to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongPositive1() { long longVal = 268209772258930018L; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1064,12 +735,6 @@ public class BigIntegerConvertTest extends TestCase { * valueOf (long val): convert a positive long value to a BigInteger. * The long value fits in integer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongPositive2() { long longVal = 58930018L; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1085,12 +750,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert a negative long value to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongNegative1() { long longVal = -268209772258930018L; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1107,12 +766,6 @@ public class BigIntegerConvertTest extends TestCase { * valueOf (long val): convert a negative long value to a BigInteger. * The long value fits in integer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongNegative2() { long longVal = -58930018L; BigInteger aNumber = BigInteger.valueOf(longVal); @@ -1127,12 +780,6 @@ public class BigIntegerConvertTest extends TestCase { /** * valueOf (long val): convert a zero long value to a BigInteger. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for valueOf method.", - method = "valueOf", - args = {long.class} - ) public void testValueOfLongZero() { long longVal = 0L; BigInteger aNumber = BigInteger.valueOf(longVal); diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerDivideTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerDivideTest.java index f46a6ec..b3fec51 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerDivideTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerDivideTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Methods: divide, remainder, mod, and divideAndRemainder @@ -38,12 +33,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide by zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase1() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {0}; @@ -62,12 +51,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide by ZERO */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase2() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; int aSign = 1; @@ -84,12 +67,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide two equal positive numbers */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase3() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; byte bBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; @@ -110,12 +87,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide two equal in absolute value numbers of different signs. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase4() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; byte bBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; @@ -137,12 +108,6 @@ public class BigIntegerDivideTest extends TestCase { * Divide two numbers of different length and different signs. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase5() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; byte bBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 1, 2, 3, 4, 5}; @@ -164,12 +129,6 @@ public class BigIntegerDivideTest extends TestCase { * Divide two positive numbers of the same length. * The second is greater. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase6() { byte aBytes[] = {1, 100, 56, 7, 98, -1, 39, -128, 127}; byte bBytes[] = {15, 100, 56, 7, 98, -1, 39, -128, 127}; @@ -190,12 +149,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide two positive numbers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase7() { byte aBytes[] = {1, 100, 56, 7, 98, -1, 39, -128, 127, 5, 6, 7, 8, 9}; byte bBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; @@ -216,12 +169,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide a positive number by a negative one. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase8() { byte aBytes[] = {1, 100, 56, 7, 98, -1, 39, -128, 127, 5, 6, 7, 8, 9}; byte bBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; @@ -242,12 +189,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide a negative number by a positive one. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase9() { byte aBytes[] = {1, 100, 56, 7, 98, -1, 39, -128, 127, 5, 6, 7, 8, 9}; byte bBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; @@ -268,12 +209,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide two negative numbers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase10() { byte aBytes[] = {1, 100, 56, 7, 98, -1, 39, -128, 127, 5, 6, 7, 8, 9}; byte bBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; @@ -294,12 +229,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide zero by a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase11() { byte aBytes[] = {0}; byte bBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; @@ -320,12 +249,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide ZERO by a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase12() { byte bBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; int bSign = -1; @@ -344,12 +267,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide a positive number by ONE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase13() { byte aBytes[] = {15, 48, -29, 7, 98, -1, 39, -128}; int aSign = 1; @@ -368,12 +285,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide ONE by ONE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testCase14() { byte rBytes[] = {1}; BigInteger aNumber = BigInteger.ONE; @@ -390,12 +301,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Verifies the case when borrow != 0 in the private divide method. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testDivisionKnuth1() { byte aBytes[] = {-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {-3, -3, -3, -3}; @@ -416,12 +321,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Verifies the case when the divisor is already normalized. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testDivisionKnuthIsNormalized() { byte aBytes[] = {-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5}; byte bBytes[] = {-1, -1, -1, -1, -1, -1, -1, -1}; @@ -443,12 +342,6 @@ public class BigIntegerDivideTest extends TestCase { * Verifies the case when the first digits of the dividend * and divisor equal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testDivisionKnuthFirstDigitsEqual() { byte aBytes[] = {2, -3, -4, -5, -1, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5}; byte bBytes[] = {2, -3, -4, -5, -1, -1, -1, -1}; @@ -469,12 +362,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide the number of one digit by the number of one digit */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testDivisionKnuthOneDigitByOneDigit() { byte aBytes[] = {113, -83, 123, -5}; byte bBytes[] = {2, -3, -4, -5}; @@ -495,12 +382,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide the number of multi digits by the number of one digit */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for divide method.", - method = "divide", - args = {java.math.BigInteger.class} - ) public void testDivisionKnuthMultiDigitsByOneDigit() { byte aBytes[] = {113, -83, 123, -5, 18, -34, 67, 39, -29}; byte bBytes[] = {2, -3, -4, -5}; @@ -521,12 +402,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Remainder of division by zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testCase15() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {0}; @@ -545,12 +420,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Remainder of division of equal numbers */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testCase16() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; byte bBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127}; @@ -571,12 +440,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Remainder of division of two positive numbers */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testCase17() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; @@ -597,12 +460,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Remainder of division of two negative numbers */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testCase18() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; @@ -624,12 +481,6 @@ public class BigIntegerDivideTest extends TestCase { * Remainder of division of two numbers of different signs. * The first is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testCase19() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; @@ -651,12 +502,6 @@ public class BigIntegerDivideTest extends TestCase { * Remainder of division of two numbers of different signs. * The first is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testCase20() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; @@ -677,12 +522,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Tests the step D6 from the Knuth algorithm */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testRemainderKnuth1() { byte aBytes[] = {-9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1}; byte bBytes[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; @@ -703,12 +542,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide the number of one digit by the number of one digit */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testRemainderKnuthOneDigitByOneDigit() { byte aBytes[] = {113, -83, 123, -5}; byte bBytes[] = {2, -3, -4, -50}; @@ -729,12 +562,6 @@ public class BigIntegerDivideTest extends TestCase { /** * Divide the number of multi digits by the number of one digit */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for remainder method.", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void testRemainderKnuthMultiDigitsByOneDigit() { byte aBytes[] = {113, -83, 123, -5, 18, -34, 67, 39, -29}; byte bBytes[] = {2, -3, -4, -50}; @@ -756,11 +583,6 @@ public class BigIntegerDivideTest extends TestCase { * divideAndRemainder of two numbers of different signs. * The first is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "divideAndRemainder", - args = {java.math.BigInteger.class} - ) public void testCase21() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; @@ -793,11 +615,6 @@ public class BigIntegerDivideTest extends TestCase { /** * divideAndRemainder of division by zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - method = "divideAndRemainder", - args = {java.math.BigInteger.class} - ) public void testCase21byZero() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {0}; @@ -816,12 +633,6 @@ public class BigIntegerDivideTest extends TestCase { /** * mod when modulus is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mod method.", - method = "mod", - args = {java.math.BigInteger.class} - ) public void testCase22() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {1, 30, 40, 56, -1, 45}; @@ -840,12 +651,6 @@ public class BigIntegerDivideTest extends TestCase { /** * mod when a divisor is positive */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mod method.", - method = "mod", - args = {java.math.BigInteger.class} - ) public void testCase23() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; @@ -866,12 +671,6 @@ public class BigIntegerDivideTest extends TestCase { /** * mod when a divisor is negative */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for mod method.", - method = "mod", - args = {java.math.BigInteger.class} - ) public void testCase24() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75}; byte bBytes[] = {27, -15, 65, 39, 100}; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerHashCodeTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerHashCodeTest.java index d351fa8..a63a514 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerHashCodeTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerHashCodeTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: hashCode() @@ -38,12 +33,6 @@ public class BigIntegerHashCodeTest extends TestCase { /** * Test hash codes for the same object */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for hashCode method.", - method = "hashCode", - args = {} - ) public void testSameObject() { String value1 = "12378246728727834290276457386374882976782849"; String value2 = "-5634562095872038262928728727834290276457386374882976782849"; @@ -62,12 +51,6 @@ public class BigIntegerHashCodeTest extends TestCase { /** * Test hash codes for equal objects. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for hashCode method.", - method = "hashCode", - args = {} - ) public void testEqualObjects() { String value1 = "12378246728727834290276457386374882976782849"; String value2 = "12378246728727834290276457386374882976782849"; @@ -84,12 +67,6 @@ public class BigIntegerHashCodeTest extends TestCase { * Test hash codes for unequal objects. * The codes are unequal. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for hashCode method.", - method = "hashCode", - args = {} - ) public void testUnequalObjectsUnequal() { String value1 = "12378246728727834290276457386374882976782849"; String value2 = "-5634562095872038262928728727834290276457386374882976782849"; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerModPowTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerModPowTest.java index 7142f16..1c5cba3 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerModPowTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerModPowTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Methods: modPow, modInverse, and gcd @@ -38,12 +33,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modPow: non-positive modulus */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modPow method.", - method = "modPow", - args = {java.math.BigInteger.class, java.math.BigInteger.class} - ) public void testModPowException() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte eBytes[] = {1, 2, 3, 4, 5}; @@ -65,12 +54,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modPow: positive exponent */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modPow method.", - method = "modPow", - args = {java.math.BigInteger.class, java.math.BigInteger.class} - ) public void testModPowPosExp() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75, 48, -7}; byte eBytes[] = {27, -15, 65, 39}; @@ -94,12 +77,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modPow: negative exponent */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modPow method.", - method = "modPow", - args = {java.math.BigInteger.class, java.math.BigInteger.class} - ) public void testModPowNegExp() { byte aBytes[] = {-127, 100, 56, 7, 98, -1, 39, -128, 127, 75, 48, -7}; byte eBytes[] = {27, -15, 65, 39}; @@ -123,12 +100,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modInverse: non-positive modulus */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modInverse method.", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void testmodInverseException() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; byte mBytes[] = {1, 2, 3}; @@ -147,12 +118,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modInverse: non-invertible number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modInverse method.", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void testmodInverseNonInvertible() { byte aBytes[] = {-15, 24, 123, 56, -11, -112, -34, -98, 8, 10, 12, 14, 25, 125, -15, 28, -127}; byte mBytes[] = {-12, 1, 0, 0, 0, 23, 44, 55, 66}; @@ -171,12 +136,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modInverse: positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modInverse method.", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void testmodInversePos1() { byte aBytes[] = {24, 123, 56, -11, -112, -34, -98, 8, 10, 12, 14, 25, 125, -15, 28, -127}; byte mBytes[] = {122, 45, 36, 100, 122, 45}; @@ -197,12 +156,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modInverse: positive number (another case: a < 0) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modInverse method.", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void testmodInversePos2() { byte aBytes[] = {15, 24, 123, 56, -11, -112, -34, -98, 8, 10, 12, 14, 25, 125, -15, 28, -127}; byte mBytes[] = {2, 122, 45, 36, 100}; @@ -223,12 +176,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modInverse: negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modInverse method.", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void testmodInverseNeg1() { byte aBytes[] = {15, 24, 123, 56, -11, -112, -34, -98, 8, 10, 12, 14, 25, 125, -15, 28, -127}; byte mBytes[] = {2, 122, 45, 36, 100}; @@ -249,12 +196,6 @@ public class BigIntegerModPowTest extends TestCase { /** * modInverse: negative number (another case: x < 0) */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for modInverse method.", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void testmodInverseNeg2() { byte aBytes[] = {-15, 24, 123, 57, -15, 24, 123, 57, -15, 24, 123, 57}; byte mBytes[] = {122, 2, 4, 122, 2, 4}; @@ -273,12 +214,6 @@ public class BigIntegerModPowTest extends TestCase { /** * gcd: the second number is zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for gcd method.", - method = "gcd", - args = {java.math.BigInteger.class} - ) public void testGcdSecondZero() { byte aBytes[] = {15, 24, 123, 57, -15, 24, 123, 57, -15, 24, 123, 57}; byte bBytes[] = {0}; @@ -299,12 +234,6 @@ public class BigIntegerModPowTest extends TestCase { /** * gcd: the first number is zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for gcd method.", - method = "gcd", - args = {java.math.BigInteger.class} - ) public void testGcdFirstZero() { byte aBytes[] = {0}; byte bBytes[] = {15, 24, 123, 57, -15, 24, 123, 57, -15, 24, 123, 57}; @@ -325,12 +254,6 @@ public class BigIntegerModPowTest extends TestCase { /** * gcd: the first number is ZERO */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for gcd method.", - method = "gcd", - args = {java.math.BigInteger.class} - ) public void testGcdFirstZERO() { byte bBytes[] = {15, 24, 123, 57, -15, 24, 123, 57, -15, 24, 123, 57}; int bSign = 1; @@ -349,12 +272,6 @@ public class BigIntegerModPowTest extends TestCase { /** * gcd: both numbers are zeros */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for gcd method.", - method = "gcd", - args = {java.math.BigInteger.class} - ) public void testGcdBothZeros() { byte rBytes[] = {0}; BigInteger aNumber = new BigInteger("0"); @@ -370,12 +287,6 @@ public class BigIntegerModPowTest extends TestCase { /** * gcd: the first number is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for gcd method.", - method = "gcd", - args = {java.math.BigInteger.class} - ) public void testGcdFirstLonger() { byte aBytes[] = {-15, 24, 123, 56, -11, -112, -34, -98, 8, 10, 12, 14, 25, 125, -15, 28, -127}; byte bBytes[] = {-12, 1, 0, 0, 0, 23, 44, 55, 66}; @@ -396,12 +307,6 @@ public class BigIntegerModPowTest extends TestCase { /** * gcd: the second number is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for gcd method.", - method = "gcd", - args = {java.math.BigInteger.class} - ) public void testGcdSecondLonger() { byte aBytes[] = {-12, 1, 0, 0, 0, 23, 44, 55, 66}; byte bBytes[] = {-15, 24, 123, 56, -11, -112, -34, -98, 8, 10, 12, 14, 25, 125, -15, 28, -127}; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerMultiplyTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerMultiplyTest.java index 59ff3c6..e016294 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerMultiplyTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerMultiplyTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: multiply @@ -38,12 +33,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply two negative numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase1() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -65,12 +54,6 @@ public class BigIntegerMultiplyTest extends TestCase { * Multiply two numbers of the same length and different signs. * The first is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase2() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -92,12 +75,6 @@ public class BigIntegerMultiplyTest extends TestCase { * Multiply two positive numbers of different length. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase3() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -120,12 +97,6 @@ public class BigIntegerMultiplyTest extends TestCase { * Multiply two positive numbers of different length. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase4() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; @@ -149,12 +120,6 @@ public class BigIntegerMultiplyTest extends TestCase { * The first is positive. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase5() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -178,12 +143,6 @@ public class BigIntegerMultiplyTest extends TestCase { * The first is positive. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase6() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; @@ -205,12 +164,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply a number by zero. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase7() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; byte bBytes[] = {0}; @@ -231,12 +184,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply a number by ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase8() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; int aSign = 1; @@ -255,12 +202,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply a positive number by ONE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase9() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; int aSign = 1; @@ -279,12 +220,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply a negative number by ONE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testCase10() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 1, 2, 3, 4, 5}; int aSign = -1; @@ -303,12 +238,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply two numbers of 4 bytes length. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testIntbyInt1() { byte aBytes[] = {10, 20, 30, 40}; byte bBytes[] = {1, 2, 3, 4}; @@ -329,12 +258,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Multiply two numbers of 4 bytes length. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for multiply method.", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void testIntbyInt2() { byte aBytes[] = {-1, -1, -1, -1}; byte bBytes[] = {-1, -1, -1, -1}; @@ -355,12 +278,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Negative exponent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for pow method.", - method = "pow", - args = {int.class} - ) public void testPowException() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7}; int aSign = 1; @@ -377,12 +294,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Exponentiation of a negative number to an odd exponent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for pow method.", - method = "pow", - args = {int.class} - ) public void testPowNegativeNumToOddExp() { byte aBytes[] = {50, -26, 90, 69, 120, 32, 63, -103, -14, 35}; int aSign = -1; @@ -404,12 +315,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Exponentiation of a negative number to an even exponent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for pow method.", - method = "pow", - args = {int.class} - ) public void testPowNegativeNumToEvenExp() { byte aBytes[] = {50, -26, 90, 69, 120, 32, 63, -103, -14, 35}; int aSign = -1; @@ -430,12 +335,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Exponentiation of a negative number to zero exponent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for pow method.", - method = "pow", - args = {int.class} - ) public void testPowNegativeNumToZeroExp() { byte aBytes[] = {50, -26, 90, 69, 120, 32, 63, -103, -14, 35}; int aSign = -1; @@ -454,12 +353,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Exponentiation of a positive number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for pow method.", - method = "pow", - args = {int.class} - ) public void testPowPositiveNum() { byte aBytes[] = {50, -26, 90, 69, 120, 32, 63, -103, -14, 35}; int aSign = 1; @@ -481,12 +374,6 @@ public class BigIntegerMultiplyTest extends TestCase { /** * Exponentiation of a negative number to zero exponent. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for pow method.", - method = "pow", - args = {int.class} - ) public void testPowPositiveNumToZeroExp() { byte aBytes[] = {50, -26, 90, 69, 120, 32, 63, -103, -14, 35}; int aSign = 1; diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerNotTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerNotTest.java index 6ca350b..c88c412 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerNotTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerNotTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Methods: and, andNot @@ -38,12 +33,6 @@ public class BigIntegerNotTest extends TestCase { /** * andNot for two positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for andNot method.", - method = "andNot", - args = {java.math.BigInteger.class} - ) public void testAndNotPosPosFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -64,12 +53,6 @@ public class BigIntegerNotTest extends TestCase { /** * andNot for two positive numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for andNot method.", - method = "andNot", - args = {java.math.BigInteger.class} - ) public void testAndNotPosPosFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -90,12 +73,6 @@ public class BigIntegerNotTest extends TestCase { /** * andNot for two negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for andNot method.", - method = "andNot", - args = {java.math.BigInteger.class} - ) public void testAndNotNegNegFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -116,12 +93,6 @@ public class BigIntegerNotTest extends TestCase { /** * andNot for a negative and a positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for andNot method.", - method = "andNot", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -142,12 +113,6 @@ public class BigIntegerNotTest extends TestCase { /** * Not for ZERO */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for not method.", - method = "not", - args = {} - ) public void testNotZero() { byte rBytes[] = {-1}; BigInteger aNumber = BigInteger.ZERO; @@ -163,12 +128,6 @@ public class BigIntegerNotTest extends TestCase { /** * Not for ONE */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for not method.", - method = "not", - args = {} - ) public void testNotOne() { byte rBytes[] = {-2}; BigInteger aNumber = BigInteger.ONE; @@ -184,12 +143,6 @@ public class BigIntegerNotTest extends TestCase { /** * Not for a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for not method.", - method = "not", - args = {} - ) public void testNotPos() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; int aSign = 1; @@ -207,12 +160,6 @@ public class BigIntegerNotTest extends TestCase { /** * Not for a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for not method.", - method = "not", - args = {} - ) public void testNotNeg() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; int aSign = -1; @@ -231,12 +178,6 @@ public class BigIntegerNotTest extends TestCase { * Not for a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for not method.", - method = "not", - args = {} - ) public void testNotSpecialCase() { byte aBytes[] = {-1, -1, -1, -1}; int aSign = 1; @@ -250,4 +191,4 @@ public class BigIntegerNotTest extends TestCase { } assertEquals("incorrect sign", -1, result.signum()); } -}
\ No newline at end of file +} diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOperateBitsTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOperateBitsTest.java index f28ec43..d55a992 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOperateBitsTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOperateBitsTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Methods: bitLength, shiftLeft, shiftRight, @@ -39,12 +34,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitCount() of zero. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitCount method.", - method = "bitCount", - args = {} - ) public void testBitCountZero() { BigInteger aNumber = new BigInteger("0"); assertEquals(0, aNumber.bitCount()); @@ -53,12 +42,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitCount() of a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitCount method.", - method = "bitCount", - args = {} - ) public void testBitCountNeg() { BigInteger aNumber = new BigInteger("-12378634756382937873487638746283767238657872368748726875"); assertEquals(87, aNumber.bitCount()); @@ -67,12 +50,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitCount() of a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitCount method.", - method = "bitCount", - args = {} - ) public void testBitCountPos() { BigInteger aNumber = new BigInteger("12378634756343564757582937873487638746283767238657872368748726875"); assertEquals(107, aNumber.bitCount()); @@ -81,12 +58,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of zero. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthZero() { BigInteger aNumber = new BigInteger("0"); assertEquals(0, aNumber.bitLength()); @@ -95,12 +66,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of a positive number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthPositive1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = 1; @@ -111,12 +76,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of a positive number with the leftmost bit set */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthPositive2() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -127,12 +86,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of a positive number which is a power of 2 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthPositive3() { byte aBytes[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = 1; @@ -143,12 +96,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of a negative number. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthNegative1() { byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91}; int aSign = -1; @@ -159,12 +106,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of a negative number with the leftmost bit set */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthNegative2() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -175,12 +116,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * bitLength() of a negative number which is a power of 2 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for bitLength method.", - method = "bitLength", - args = {} - ) public void testBitLengthNegative3() { byte aBytes[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; @@ -191,12 +126,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) of a negative n */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitException() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -213,12 +142,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) outside zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitZero() { byte aBytes[] = {0}; int aSign = 0; @@ -237,12 +160,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) outside zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitZeroOutside1() { byte aBytes[] = {0}; int aSign = 0; @@ -261,12 +178,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeInside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -285,12 +196,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeInside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -309,12 +214,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(2) in the negative number with all ones in bit representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeInside3() { String as = "-18446744073709551615"; int number = 2; @@ -328,12 +227,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * with all ones in bit representation. * the resulting number's length is 2. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeInside4() { String as = "-4294967295"; String res = "-4294967296"; @@ -348,12 +241,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * with all ones in bit representation. * the resulting number's length is 3. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeInside5() { String as = "-18446744073709551615"; String res = "-18446744073709551616"; @@ -366,12 +253,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) outside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeOutside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -390,12 +271,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) outside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitNegativeOutside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -414,12 +289,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveInside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -438,12 +307,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveInside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -462,12 +325,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveInside3() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -486,12 +343,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveInside4 () { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -510,12 +361,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveInside5 () { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -534,12 +379,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) outside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveOutside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -558,12 +397,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) outside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitPositiveOutside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -582,12 +415,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * clearBit(int n) the leftmost bit in a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for clearBit method.", - method = "clearBit", - args = {int.class} - ) public void testClearBitTopNegative() { byte aBytes[] = {1, -128, 56, 100, -15, 35, 26}; int aSign = -1; @@ -606,12 +433,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) of a negative n */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitException() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -628,12 +449,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitZero() { byte aBytes[] = {0}; int aSign = 0; @@ -652,12 +467,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) outside zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitZeroOutside1() { byte aBytes[] = {0}; int aSign = 0; @@ -676,12 +485,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) outside zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitZeroOutside2() { byte aBytes[] = {0}; int aSign = 0; @@ -700,12 +503,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) the leftmost bit in a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitLeftmostNegative() { byte aBytes[] = {1, -128, 56, 100, -15, 35, 26}; int aSign = -1; @@ -724,12 +521,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) the leftmost bit in a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitLeftmostPositive() { byte aBytes[] = {1, -128, 56, 100, -15, 35, 26}; int aSign = 1; @@ -748,12 +539,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) inside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeInside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -772,12 +557,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) inside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeInside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -796,12 +575,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) inside a negative number with all ones in bit representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeInside3() { String as = "-18446744073709551615"; String res = "-18446744073709551611"; @@ -816,12 +589,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * with all ones in bit representation. * the resulting number's length is 2. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeInside4() { String as = "-4294967295"; String res = "-4294967296"; @@ -836,12 +603,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * with all ones in bit representation. * the resulting number's length is 3. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeInside5() { String as = "-18446744073709551615"; String res = "-18446744073709551616"; @@ -854,12 +615,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) outside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeOutside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -878,12 +633,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) outside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitNegativeOutside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -902,12 +651,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitPositiveInside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -926,12 +669,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitPositiveInside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -950,12 +687,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) outside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitPositiveOutside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -974,12 +705,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * flipBit(int n) outside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for flipBit method.", - method = "flipBit", - args = {int.class} - ) public void testFlipBitPositiveOutside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -998,12 +723,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) of a negative n */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitException() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1020,12 +739,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) outside zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitZero() { byte aBytes[] = {0}; int aSign = 0; @@ -1044,12 +757,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) outside zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitZeroOutside1() { byte aBytes[] = {0}; int aSign = 0; @@ -1068,12 +775,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitPositiveInside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1092,12 +793,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitPositiveInside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1116,12 +811,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitPositiveInside3() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1140,12 +829,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitPositiveInside4 () { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1164,12 +847,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) outside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitPositiveOutside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1188,12 +865,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) outside a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitPositiveOutside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1212,12 +883,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) the leftmost bit in a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitTopPositive() { byte aBytes[] = {1, -128, 56, 100, -15, 35, 26}; int aSign = 1; @@ -1236,12 +901,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) the leftmost bit in a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitLeftmostNegative() { byte aBytes[] = {1, -128, 56, 100, -15, 35, 26}; int aSign = -1; @@ -1260,12 +919,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeInside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1284,12 +937,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeInside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1308,12 +955,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) inside a negative number with all ones in bit representation */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeInside3() { String as = "-18446744073709551615"; String res = "-18446744073709551611"; @@ -1328,12 +969,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * with all ones in bit representation. * the resulting number's length is 2. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeInside4() { String as = "-4294967295"; int number = 0; @@ -1347,12 +982,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * with all ones in bit representation. * the resulting number's length is 3. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeInside5() { String as = "-18446744073709551615"; int number = 0; @@ -1364,12 +993,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) outside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeOutside1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1388,12 +1011,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * setBit(int n) outside a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitNegativeOutside2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1414,12 +1031,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * represented as n * 32 + 31, where n is an arbitrary integer. * Here 191 = 5 * 32 + 31 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for setBit method.", - method = "setBit", - args = {int.class} - ) public void testSetBitBug1331() { BigInteger result = BigInteger.valueOf(0L).setBit(191); assertEquals("incorrect value", "3138550867693340381917894711603833208051177722232017256448", result.toString()); @@ -1429,12 +1040,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftLeft(int n), n = 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftLeft method.", - method = "shiftLeft", - args = {int.class} - ) public void testShiftLeft1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1453,12 +1058,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftLeft(int n), n < 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftLeft method.", - method = "shiftLeft", - args = {int.class} - ) public void testShiftLeft2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1477,12 +1076,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftLeft(int n) a positive number, n > 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftLeft method.", - method = "shiftLeft", - args = {int.class} - ) public void testShiftLeft3() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1501,12 +1094,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftLeft(int n) a positive number, n > 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftLeft method.", - method = "shiftLeft", - args = {int.class} - ) public void testShiftLeft4() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1525,12 +1112,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftLeft(int n) a negative number, n > 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftLeft method.", - method = "shiftLeft", - args = {int.class} - ) public void testShiftLeft5() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1549,12 +1130,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftRight(int n), n = 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRight1() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1573,12 +1148,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftRight(int n), n < 0 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRight2() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1597,12 +1166,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftRight(int n), 0 < n < 32 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRight3() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1621,12 +1184,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftRight(int n), n > 32 */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRight4() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1645,12 +1202,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * shiftRight(int n), n is greater than bitLength() */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRight5() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1671,12 +1222,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * shift distance is multiple of 32; * shifted bits are NOT zeroes. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRightNegNonZeroesMul32() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 1, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; @@ -1697,12 +1242,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * shift distance is NOT multiple of 32; * shifted bits are NOT zeroes. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRightNegNonZeroes() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; @@ -1723,12 +1262,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * shift distance is NOT multiple of 32; * shifted bits are zeroes. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRightNegZeroes() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; @@ -1749,12 +1282,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * shift distance is multiple of 32; * shifted bits are zeroes. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "shiftRight", - args = {int.class} - ) public void testShiftRightNegZeroesMul32() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 0, 0, 0, 0, 0, 0, 0, 0}; int aSign = -1; @@ -1773,12 +1300,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a negative n */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitException() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1795,12 +1316,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitPositive1() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1812,12 +1327,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitPositive2() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1829,12 +1338,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a positive number, n > bitLength() */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitPositive3() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; @@ -1846,12 +1349,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitNegative1() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1863,12 +1360,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a positive n */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitNegative2() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1880,12 +1371,6 @@ public class BigIntegerOperateBitsTest extends TestCase { /** * testBit(int n) of a positive n, n > bitLength() */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for shiftRight method.", - method = "testBit", - args = {int.class} - ) public void testTestBitNegative3() { byte aBytes[] = {-1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = -1; @@ -1900,12 +1385,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * @tests java.math.BigInteger#getLowestSetBit() getLowestSetBit for * negative BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for getLowestSetBit method.", - method = "getLowestSetBit", - args = {} - ) public void test_getLowestSetBitNeg() { byte aBytes[] = { -1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26 @@ -1921,12 +1400,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * @tests java.math.BigInteger#getLowestSetBit() getLowestSetBit for * positive BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for getLowestSetBit method.", - method = "getLowestSetBit", - args = {} - ) public void test_getLowestSetBitPos() { byte aBytes[] = { -1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26 @@ -1958,12 +1431,6 @@ public class BigIntegerOperateBitsTest extends TestCase { * @tests java.math.BigInteger#getLowestSetBit() getLowestSetBit for zero * BigInteger */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for getLowestSetBit method.", - method = "getLowestSetBit", - args = {} - ) public void test_getLowestSetBitZero() { byte[] aBytes = { 0 diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOrTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOrTest.java index 7b0e076..175a7a7 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOrTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerOrTest.java @@ -21,16 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.BrokenTest; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: or @@ -39,12 +33,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for zero and a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testZeroPos() { byte aBytes[] = {0}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -65,12 +53,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for zero and a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testZeroNeg() { byte aBytes[] = {0}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -91,12 +73,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for a positive number and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosZero() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {0}; @@ -117,12 +93,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for a negative number and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegPos() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {0}; @@ -143,12 +113,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for zero and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testZeroZero() { byte aBytes[] = {0}; byte bBytes[] = {0}; @@ -169,12 +133,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for zero and one */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testZeroOne() { byte aBytes[] = {0}; byte bBytes[] = {1}; @@ -195,12 +153,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for one and one */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testOneOne() { byte aBytes[] = {1}; byte bBytes[] = {1}; @@ -221,12 +173,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two positive numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosPosSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -247,12 +193,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosPosFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -273,12 +213,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two positive numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosPosFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -299,12 +233,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two negative numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegNegSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -325,12 +253,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegNegFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -351,12 +273,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two negative numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegNegFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -377,12 +293,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two numbers of different signs and the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosNegSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -403,12 +313,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two numbers of different signs and the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegPosSameLength() { byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -429,12 +333,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for a negative and a positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -455,12 +353,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for two negative numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -481,12 +373,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for a positive and a negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosNegFirstLonger() { byte aBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; byte bBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; @@ -507,12 +393,6 @@ public class BigIntegerOrTest extends TestCase { /** * Or for a positive and a negative number; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) public void testPosNegFirstShorter() { byte aBytes[] = {-2, -3, -4, -4, 5, 14, 23, 39, 48, 57, 66, 5, 14, 23}; byte bBytes[] = {-128, 9, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, -117, 23, 87, -25, -75}; @@ -530,13 +410,6 @@ public class BigIntegerOrTest extends TestCase { assertEquals("incorrect sign", -1, result.signum()); } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for or operation", - method = "or", - args = {java.math.BigInteger.class} - ) - @BrokenTest("Fails in CTS environment, but passes in CoreTestRunner") public void testRegression() { // Regression test for HARMONY-1996 BigInteger x = new BigInteger("-1023"); diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerSubtractTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerSubtractTest.java index 29d8405..1103a08 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerSubtractTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerSubtractTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: subtract @@ -39,12 +34,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two positive numbers of the same length. * The first is greater. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase1() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; @@ -66,12 +55,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two positive numbers of the same length. * The second is greater. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase2() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -94,12 +77,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is positive. * The first is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase3() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; @@ -122,12 +99,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is positive. * The second is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase4() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -149,12 +120,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two negative numbers of the same length. * The first is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase5() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; @@ -176,12 +141,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two negative numbers of the same length. * The second is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase6() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -204,12 +163,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is negative. * The first is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase7() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; @@ -232,12 +185,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is negative. * The second is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase8() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -259,12 +206,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two positive numbers of different length. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase9() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -286,12 +227,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two positive numbers of different length. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase10() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -314,12 +249,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is positive. * The first is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase11() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -342,12 +271,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is positive. * The second is greater in absolute value. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase12() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -370,12 +293,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is negative. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase13() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -398,12 +315,6 @@ public class BigIntegerSubtractTest extends TestCase { * The first is negative. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase14() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -425,12 +336,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two negative numbers of different length. * The first is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase15() { byte aBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; byte bBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; @@ -452,12 +357,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract two negative numbers of different length. * The second is longer. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase16() { byte aBytes[] = {10, 20, 30, 40, 50, 60, 70, 10, 20, 30}; byte bBytes[] = {1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7}; @@ -478,12 +377,6 @@ public class BigIntegerSubtractTest extends TestCase { /** * Subtract two positive equal in absolute value numbers. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase17() { byte aBytes[] = {-120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; byte bBytes[] = {-120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; @@ -505,12 +398,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract zero from a number. * The number is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase18() { byte aBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; byte bBytes[] = {0}; @@ -532,12 +419,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract a number from zero. * The number is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase19() { byte aBytes[] = {0}; byte bBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; @@ -558,12 +439,6 @@ public class BigIntegerSubtractTest extends TestCase { /** * Subtract zero from zero. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase20() { byte aBytes[] = {0}; byte bBytes[] = {0}; @@ -585,12 +460,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract ZERO from a number. * The number is positive. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase21() { byte aBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; byte rBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; @@ -610,12 +479,6 @@ public class BigIntegerSubtractTest extends TestCase { * Subtract a number from ZERO. * The number is negative. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase22() { byte bBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; byte rBytes[] = {120, 34, 78, -23, -111, 45, 127, 23, 45, -3}; @@ -634,12 +497,6 @@ public class BigIntegerSubtractTest extends TestCase { /** * Subtract ZERO from ZERO. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase23() { byte rBytes[] = {0}; BigInteger aNumber = BigInteger.ZERO; @@ -656,12 +513,6 @@ public class BigIntegerSubtractTest extends TestCase { /** * Subtract ONE from ONE. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase24() { byte rBytes[] = {0}; BigInteger aNumber = BigInteger.ONE; @@ -678,12 +529,6 @@ public class BigIntegerSubtractTest extends TestCase { /** * Subtract two numbers so that borrow is 1. */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for subtract method", - method = "subtract", - args = {java.math.BigInteger.class} - ) public void testCase25() { byte aBytes[] = {-1, -1, -1, -1, -1, -1, -1, -1}; byte bBytes[] = {-128, -128, -128, -128, -128, -128, -128, -128, -128}; @@ -701,4 +546,3 @@ public class BigIntegerSubtractTest extends TestCase { assertEquals(-1, result.signum()); } } - diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerToStringTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerToStringTest.java index c405553..34b4b19 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerToStringTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerToStringTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: toString(int radix) @@ -38,12 +33,6 @@ public class BigIntegerToStringTest extends TestCase { /** * If 36 < radix < 2 it should be set to 10 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadixOutOfRange() { String value = "442429234853876401"; int radix = 10; @@ -55,12 +44,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test negative number of radix 2 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix2Neg() { String value = "-101001100010010001001010101110000101010110001010010101010101010101010101010101010101010101010010101"; int radix = 2; @@ -72,12 +55,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test positive number of radix 2 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix2Pos() { String value = "101000011111000000110101010101010101010001001010101010101010010101010101010000100010010"; int radix = 2; @@ -89,12 +66,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test negative number of radix 10 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix10Neg() { String value = "-2489756308572364789878394872984"; int radix = 16; @@ -106,12 +77,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test positive number of radix 10 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix10Pos() { String value = "2387627892347567398736473476"; int radix = 16; @@ -123,12 +88,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test negative number of radix 16 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix16Neg() { String value = "-287628a883451b800865c67e8d7ff20"; int radix = 16; @@ -140,12 +99,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test positive number of radix 16 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix16Pos() { String value = "287628a883451b800865c67e8d7ff20"; int radix = 16; @@ -157,12 +110,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test negative number of radix 24 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix24Neg() { String value = "-287628a88gmn3451b8ijk00865c67e8d7ff20"; int radix = 24; @@ -174,12 +121,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test positive number of radix 24 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix24Pos() { String value = "287628a883451bg80ijhk0865c67e8d7ff20"; int radix = 24; @@ -191,12 +132,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test negative number of radix 24 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix36Neg() { String value = "-uhguweut98iu4h3478tq3985pq98yeiuth33485yq4aiuhalai485yiaehasdkr8tywi5uhslei8"; int radix = 36; @@ -208,12 +143,6 @@ public class BigIntegerToStringTest extends TestCase { /** * test positive number of radix 24 */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {int.class} - ) public void testRadix36Pos() { String value = "23895lt45y6vhgliuwhgi45y845htsuerhsi4586ysuerhtsio5y68peruhgsil4568ypeorihtse48y6"; int radix = 36; @@ -227,12 +156,6 @@ public class BigIntegerToStringTest extends TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void test_toString1() { String s = "0000000000"; @@ -244,12 +167,6 @@ public class BigIntegerToStringTest extends TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void test_toString2() { String s = "1234567890987654321"; BigInteger bi = new BigInteger(s); @@ -260,12 +177,6 @@ public class BigIntegerToStringTest extends TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void test_toString3() { String s = "-1234567890987654321"; BigInteger bi = new BigInteger(s); @@ -276,12 +187,6 @@ public class BigIntegerToStringTest extends TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void test_toString4() { String s = "12345678901234"; long l = 12345678901234L; @@ -293,12 +198,6 @@ public class BigIntegerToStringTest extends TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void test_toString5() { String s = "-12345678901234"; long l = -12345678901234L; @@ -310,12 +209,6 @@ public class BigIntegerToStringTest extends TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "This is a complete subset of tests for toString method", - method = "toString", - args = {} - ) public void test_toString() { byte aBytes[] = { 12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91 diff --git a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerXorTest.java b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerXorTest.java index 4e2dbcf..b55b60b 100644 --- a/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerXorTest.java +++ b/math/src/test/java/org/apache/harmony/math/tests/java/math/BigIntegerXorTest.java @@ -21,15 +21,10 @@ package org.apache.harmony.math.tests.java.math; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; - import java.math.BigInteger; import junit.framework.TestCase; -@TestTargetClass(BigInteger.class) + /** * Class: java.math.BigInteger * Method: xor @@ -38,12 +33,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for zero and a positive number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testZeroPos() { String numA = "0"; String numB = "27384627835298756289327365"; @@ -57,12 +46,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for zero and a negative number */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testZeroNeg() { String numA = "0"; String numB = "-27384627835298756289327365"; @@ -76,12 +59,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for a positive number and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosZero() { String numA = "27384627835298756289327365"; String numB = "0"; @@ -95,12 +72,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for a negative number and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegPos() { String numA = "-27384627835298756289327365"; String numB = "0"; @@ -114,12 +85,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for zero and zero */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testZeroZero() { String numA = "0"; String numB = "0"; @@ -133,12 +98,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for zero and one */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testZeroOne() { String numA = "0"; String numB = "1"; @@ -152,12 +111,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for one and one */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testOneOne() { String numA = "1"; String numB = "1"; @@ -171,12 +124,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two positive numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosPosSameLength() { String numA = "283746278342837476784564875684767"; String numB = "293478573489347658763745839457637"; @@ -190,12 +137,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosPosFirstLonger() { String numA = "2837462783428374767845648748973847593874837948575684767"; String numB = "293478573489347658763745839457637"; @@ -209,12 +150,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two positive numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosPosFirstShorter() { String numA = "293478573489347658763745839457637"; String numB = "2837462783428374767845648748973847593874837948575684767"; @@ -228,12 +163,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two negative numbers of the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegNegSameLength() { String numA = "-283746278342837476784564875684767"; String numB = "-293478573489347658763745839457637"; @@ -247,12 +176,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegNegFirstLonger() { String numA = "-2837462783428374767845648748973847593874837948575684767"; String numB = "-293478573489347658763745839457637"; @@ -266,12 +189,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two negative numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegNegFirstShorter() { String numA = "293478573489347658763745839457637"; String numB = "2837462783428374767845648748973847593874837948575684767"; @@ -285,12 +202,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two numbers of different signs and the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosNegSameLength() { String numA = "283746278342837476784564875684767"; String numB = "-293478573489347658763745839457637"; @@ -304,12 +215,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two numbers of different signs and the same length */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegPosSameLength() { String numA = "-283746278342837476784564875684767"; String numB = "293478573489347658763745839457637"; @@ -323,12 +228,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for a negative and a positive numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstLonger() { String numA = "-2837462783428374767845648748973847593874837948575684767"; String numB = "293478573489347658763745839457637"; @@ -342,12 +241,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for two negative numbers; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testNegPosFirstShorter() { String numA = "-293478573489347658763745839457637"; String numB = "2837462783428374767845648748973847593874837948575684767"; @@ -361,12 +254,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for a positive and a negative numbers; the first is longer */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosNegFirstLonger() { String numA = "2837462783428374767845648748973847593874837948575684767"; String numB = "-293478573489347658763745839457637"; @@ -380,12 +267,6 @@ public class BigIntegerXorTest extends TestCase { /** * Xor for a positive and a negative number; the first is shorter */ - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "This is a complete subset of tests for xor operation.", - method = "xor", - args = {java.math.BigInteger.class} - ) public void testPosNegFirstShorter() { String numA = "293478573489347658763745839457637"; String numB = "-2837462783428374767845648748973847593874837948575684767"; diff --git a/math/src/test/java/tests/api/java/math/BigDecimalTest.java b/math/src/test/java/tests/api/java/math/BigDecimalTest.java index 29d68a2..a053cef 100644 --- a/math/src/test/java/tests/api/java/math/BigDecimalTest.java +++ b/math/src/test/java/tests/api/java/math/BigDecimalTest.java @@ -17,12 +17,6 @@ package tests.api.java.math; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.AndroidOnly; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInputStream; @@ -32,7 +26,6 @@ import java.math.BigInteger; import java.math.RoundingMode; import java.math.MathContext; -@TestTargetClass(BigDecimal.class) public class BigDecimalTest extends junit.framework.TestCase { BigInteger value = new BigInteger("12345908"); @@ -41,12 +34,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.math.BigInteger.class} - ) public void test_ConstructorLjava_math_BigInteger() { BigDecimal big = new BigDecimal(value); assertTrue("the BigDecimal value is not initialized properly", big @@ -57,12 +44,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.math.BigInteger, int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.math.BigInteger.class, int.class} - ) public void test_ConstructorLjava_math_BigIntegerI() { BigDecimal big = new BigDecimal(value2, 5); assertTrue("the BigDecimal value is not initialized properly", big @@ -75,12 +56,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(double) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = ".", - method = "BigDecimal", - args = {double.class} - ) public void test_ConstructorD() { // // These numbers have an exact representation as doubles: @@ -132,12 +107,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.lang.String) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void test_ConstructorLjava_lang_String() throws NumberFormatException { BigDecimal big = new BigDecimal("345.23499600293850"); assertTrue("the BigDecimal value is not initialized properly", big @@ -158,12 +127,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "", - method = "BigDecimal", - args = {double.class} - ) public void test_constructor_String_plus_exp() { /* * BigDecimal does not support a + sign in the exponent when converting @@ -181,12 +144,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checked.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void test_constructor_String_empty() { try { new BigDecimal(""); @@ -198,12 +155,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checked.", - method = "BigDecimal", - args = {java.lang.String.class} - ) public void test_constructor_String_plus_minus_exp() { try { new BigDecimal("+35e+-2"); @@ -221,12 +172,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#BigDecimal(char[]) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Exception checked.", - method = "BigDecimal", - args = {char[].class} - ) public void test_constructor_CC_plus_minus_exp() { try { new BigDecimal("+35e+-2".toCharArray()); @@ -244,12 +189,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#abs() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "abs", - args = {} - ) public void test_abs() { BigDecimal big = new BigDecimal("-1234"); BigDecimal bigabs = big.abs(); @@ -264,12 +203,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#add(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "add", - args = {java.math.BigDecimal.class} - ) public void test_addLjava_math_BigDecimal() { BigDecimal add1 = new BigDecimal("23.456"); BigDecimal add2 = new BigDecimal("3849.235"); @@ -287,12 +220,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#compareTo(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "compareTo", - args = {java.math.BigDecimal.class} - ) public void test_compareToLjava_math_BigDecimal() { BigDecimal comp1 = new BigDecimal("1.00"); BigDecimal comp2 = new BigDecimal(1.000000D); @@ -309,12 +236,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#divide(java.math.BigDecimal, int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "IllegalArgumentException checking missed. Used only ROUND_UP & ROUND_DOWN round modes.", - method = "divide", - args = {java.math.BigDecimal.class, int.class} - ) public void test_divideLjava_math_BigDecimalI() { BigDecimal divd1 = new BigDecimal(value, 2); BigDecimal divd2 = new BigDecimal("2.335"); @@ -342,12 +263,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#divide(java.math.BigDecimal, int, int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "IllegalArgumentException checking missed. Used only ROUND_UP & ROUND_DOWN round modes.", - method = "divide", - args = {java.math.BigDecimal.class, int.class, int.class} - ) public void test_divideLjava_math_BigDecimalII() { BigDecimal divd1 = new BigDecimal(value2, 4); BigDecimal divd2 = new BigDecimal("0.0023"); @@ -372,12 +287,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#doubleValue() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Narrowing limitations of double representation are not checked.", - method = "doubleValue", - args = {} - ) public void test_doubleValue() { BigDecimal bigDB = new BigDecimal(-1.234E-112); // Commenting out this part because it causes an endless loop (see HARMONY-319 and HARMONY-329) @@ -409,12 +318,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#equals(java.lang.Object) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "equals", - args = {java.lang.Object.class} - ) public void test_equalsLjava_lang_Object() { BigDecimal equal1 = new BigDecimal(1.00D); BigDecimal equal2 = new BigDecimal("1.0"); @@ -442,12 +345,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#floatValue() */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Narrowing limitations of float representation are not checked.", - method = "floatValue", - args = {} - ) public void test_floatValue() { BigDecimal fl1 = new BigDecimal("234563782344567"); assertTrue("the float representation of bigDecimal 234563782344567", @@ -475,12 +372,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#hashCode() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "hashCode", - args = {} - ) public void test_hashCode() { // anything that is equal must have the same hashCode BigDecimal hash = new BigDecimal("1.00"); @@ -509,12 +400,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#intValue() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "intValue", - args = {} - ) public void test_intValue() { BigDecimal int1 = new BigDecimal(value, 3); assertTrue("the int value of 12345.908 is not 12345", @@ -533,12 +418,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#longValue() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "longValue", - args = {} - ) public void test_longValue() { BigDecimal long1 = new BigDecimal(value2.negate(), 0); assertTrue("the long value of 12334560000 is not 12334560000", long1 @@ -557,12 +436,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#max(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "max", - args = {java.math.BigDecimal.class} - ) public void test_maxLjava_math_BigDecimal() { BigDecimal max1 = new BigDecimal(value2, 1); BigDecimal max2 = new BigDecimal(value2, 4); @@ -580,12 +453,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#min(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "min", - args = {java.math.BigDecimal.class} - ) public void test_minLjava_math_BigDecimal() { BigDecimal min1 = new BigDecimal(-12345.4D); BigDecimal min2 = new BigDecimal(-12345.39D); @@ -600,12 +467,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#movePointLeft(int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "movePointLeft", - args = {int.class} - ) public void test_movePointLeftI() { BigDecimal movePtLeft = new BigDecimal("123456265.34"); BigDecimal alreadyMoved = movePtLeft.movePointLeft(5); @@ -635,12 +496,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#movePointRight(int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed.", - method = "movePointRight", - args = {int.class} - ) public void test_movePointRightI() { BigDecimal movePtRight = new BigDecimal("-1.58796521458"); BigDecimal alreadyMoved = movePtRight.movePointRight(8); @@ -667,12 +522,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#multiply(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "multiply", - args = {java.math.BigDecimal.class} - ) public void test_multiplyLjava_math_BigDecimal() { BigDecimal multi1 = new BigDecimal(value, 5); BigDecimal multi2 = new BigDecimal(2.345D); @@ -708,12 +557,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#negate() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "negate", - args = {} - ) public void test_negate() { BigDecimal negate1 = new BigDecimal(value2, 7); assertTrue("the negate of 1233.4560000 is not -1233.4560000", negate1 @@ -729,12 +572,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#scale() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "scale", - args = {} - ) public void test_scale() { BigDecimal scale1 = new BigDecimal(value2, 8); assertTrue("the scale of the number 123.34560000 is wrong", scale1 @@ -758,12 +595,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#setScale(int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setScale", - args = {int.class} - ) public void test_setScaleI() { // rounding mode defaults to zero BigDecimal setScale1 = new BigDecimal(value, 3); @@ -783,12 +614,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#setScale(int, int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setScale", - args = {int.class, int.class} - ) public void test_setScaleII() { BigDecimal setScale1 = new BigDecimal(2.323E102); BigDecimal setScale2 = setScale1.setScale(4); @@ -924,12 +749,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#setScale(int, java.math.RoundingMode) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "setScale", - args = {int.class, java.math.RoundingMode.class} - ) public void test_setScaleILjava_math_RoundingMode() { BigDecimal setScale1 = new BigDecimal(2.323E102); BigDecimal setScale2 = setScale1.setScale(4); @@ -1065,12 +884,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#signum() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "signum", - args = {} - ) public void test_signum() { BigDecimal sign = new BigDecimal(123E-104); assertTrue("123E-104 is not positive in signum()", sign.signum() == 1); @@ -1084,12 +897,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#subtract(java.math.BigDecimal) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "subtract", - args = {java.math.BigDecimal.class} - ) public void test_subtractLjava_math_BigDecimal() { BigDecimal sub1 = new BigDecimal("13948"); BigDecimal sub2 = new BigDecimal("2839.489"); @@ -1122,12 +929,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#toBigInteger() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toBigInteger", - args = {} - ) public void test_toBigInteger() { BigDecimal sub1 = new BigDecimal("-29830.989"); BigInteger result = sub1.toBigInteger(); @@ -1151,12 +952,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#toString() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toString", - args = {} - ) public void test_toString() { BigDecimal toString1 = new BigDecimal("1234.000"); assertTrue("the toString representation of 1234.000 is wrong", @@ -1175,12 +970,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#unscaledValue() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "unscaledValue", - args = {} - ) public void test_unscaledValue() { BigDecimal unsVal = new BigDecimal("-2839485.000"); assertTrue("the unscaledValue of -2839485.000 is wrong", unsVal @@ -1201,12 +990,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#valueOf(long) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "valueOf", - args = {long.class} - ) public void test_valueOfJ() { BigDecimal valueOfL = BigDecimal.valueOf(9223372036854775806L); assertTrue("the bigDecimal equivalent of 9223372036854775806 is wrong", @@ -1225,12 +1008,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#valueOf(long, int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "valueOf", - args = {long.class, int.class} - ) public void test_valueOfJI() { BigDecimal valueOfJI = BigDecimal.valueOf(9223372036854775806L, 5); assertTrue( @@ -1260,12 +1037,6 @@ public class BigDecimalTest extends junit.framework.TestCase { } - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "Checks serialization", - method = "!SerializationSelf", - args = {} - ) public void test_BigDecimal_serialization() throws Exception { // Regression for HARMONY-1896 char[] in = { '1', '5', '6', '7', '8', '7', '.', '0', '0' }; @@ -1287,12 +1058,6 @@ public class BigDecimalTest extends junit.framework.TestCase { /** * @tests java.math.BigDecimal#stripTrailingZero(long) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "The RI fails the Zero Test: has scale 4 for BigDecimal('0.0000')", - method = "stripTrailingZeros", - args = {} - ) public void test_stripTrailingZero() { BigDecimal sixhundredtest = new BigDecimal("600.0"); assertTrue("stripTrailingZero failed for 600.0", @@ -1314,12 +1079,6 @@ public class BigDecimalTest extends junit.framework.TestCase { // END android-changed } - @TestTargetNew( - level = TestLevel.PARTIAL_COMPLETE, - notes = "", - method = "abs", - args = {MathContext.class} - ) public void testMathContextConstruction() { String a = "-12380945E+61"; BigDecimal aNumber = new BigDecimal(a); diff --git a/math/src/test/java/tests/api/java/math/BigIntegerTest.java b/math/src/test/java/tests/api/java/math/BigIntegerTest.java index b84aa17..77eabb4 100644 --- a/math/src/test/java/tests/api/java/math/BigIntegerTest.java +++ b/math/src/test/java/tests/api/java/math/BigIntegerTest.java @@ -17,16 +17,9 @@ package tests.api.java.math; -import dalvik.annotation.KnownFailure; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetClass; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargets; - import java.math.BigInteger; import java.util.Random; -@TestTargetClass(BigInteger.class) public class BigIntegerTest extends junit.framework.TestCase { BigInteger minusTwo = new BigInteger("-2", 10); @@ -87,12 +80,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(int, java.util.Random) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigInteger", - args = {int.class, java.util.Random.class} - ) public void test_ConstructorILjava_util_Random() { // regression test for HARMONY-1047 try { @@ -123,12 +110,7 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(int, int, java.util.Random) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - method = "BigInteger", - args = {int.class, int.class, java.util.Random.class} - ) - @KnownFailure("BIGNUM returns no Primes smaller than 16 bits.") + // BIGNUM returns no Primes smaller than 16 bits. public void test_ConstructorIILjava_util_Random() { bi = new BigInteger(10, 5, rand); bi2 = new BigInteger(10, 5, rand); @@ -168,12 +150,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(byte[]) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "NumberFormatException checking missed", - method = "BigInteger", - args = {byte[].class} - ) public void test_Constructor$B() { byte[] myByteArray; myByteArray = new byte[] { (byte) 0x00, (byte) 0xFF, (byte) 0xFE }; @@ -188,12 +164,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(int, byte[]) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "BigInteger", - args = {int.class, byte[].class} - ) public void test_ConstructorI$B() { byte[] myByteArray; myByteArray = new byte[] { (byte) 0xFF, (byte) 0xFE }; @@ -218,12 +188,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Checks NumberFormatException", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_constructor_String_empty() { try { new BigInteger(""); @@ -235,12 +199,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#toByteArray() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toByteArray", - args = {} - ) public void test_toByteArray() { byte[] myByteArray, anotherByteArray; myByteArray = new byte[] { 97, 33, 120, 124, 50, 2, 0, 0, 0, 12, 124, @@ -274,20 +232,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#isProbablePrime(int) */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "isProbablePrime", - args = {int.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "probablePrime", - args = {int.class, java.util.Random.class} - ) - }) public void test_isProbablePrimeI() { int fails = 0; bi = new BigInteger(20, 20, rand); @@ -355,20 +299,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#nextProbablePrime() */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "nextProbablePrime", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "isProbablePrime", - args = {int.class} - ) - }) public void test_nextProbablePrime() { largePrimesProduct( new BigInteger("2537895984043447429238717358455377929009126353874925049325287329295635198252046158619999217453233889378619619008359011789"), @@ -400,12 +330,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#probablePrime(int, java.util.Random) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "probablePrime", - args = {int.class, java.util.Random.class} - ) public void test_probablePrime() { for (int bitLength = 50; bitLength <= 1050; bitLength += 100) { BigInteger a = BigInteger.probablePrime(bitLength, rand); @@ -478,12 +402,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#equals(java.lang.Object) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "equals", - args = {java.lang.Object.class} - ) public void test_equalsLjava_lang_Object() { assertTrue("0=0", zero.equals(BigInteger.valueOf(0))); assertTrue("-123=-123", BigInteger.valueOf(-123).equals( @@ -499,12 +417,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#compareTo(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "compareTo", - args = {java.math.BigInteger.class} - ) public void test_compareToLjava_math_BigInteger() { assertTrue("Smaller number returned >= 0", one.compareTo(two) < 0); assertTrue("Larger number returned >= 0", two.compareTo(one) > 0); @@ -516,12 +428,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#intValue() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "intValue", - args = {} - ) public void test_intValue() { assertTrue("Incorrect intValue for 2**70", twoToTheSeventy.intValue() == 0); @@ -531,12 +437,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#longValue() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "longValue", - args = {} - ) public void test_longValue() { assertTrue("Incorrect longValue for 2**70", twoToTheSeventy.longValue() == 0); @@ -546,12 +446,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#valueOf(long) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "valueOf", - args = {long.class} - ) public void test_valueOfJ() { assertTrue("Incurred number returned for 2", BigInteger.valueOf(2L) .equals(two)); @@ -562,12 +456,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#add(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Test is OK, but some cases listed below can be reasonable.", - method = "add", - args = {java.math.BigInteger.class} - ) public void test_addLjava_math_BigInteger() { assertTrue("Incorrect sum--wanted a zillion", aZillion.add(aZillion) .add(aZillion.negate()).equals(aZillion)); @@ -609,12 +497,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#negate() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "negate", - args = {} - ) public void test_negate() { assertTrue("Single negation of zero did not result in zero", zero .negate().equals(zero)); @@ -643,12 +525,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#signum() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "signum", - args = {} - ) public void test_signum() { assertTrue("Wrong positive signum", two.signum() == 1); assertTrue("Wrong zero signum", zero.signum() == 0); @@ -659,12 +535,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#abs() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "abs", - args = {} - ) public void test_abs() { assertTrue("Invalid number returned for zillion", aZillion.negate() .abs().equals(aZillion.abs())); @@ -678,12 +548,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#pow(int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checking missed", - method = "pow", - args = {int.class} - ) public void test_powI() { assertTrue("Incorrect exponent returned for 2**10", two.pow(10).equals( twoToTheTen)); @@ -696,12 +560,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#modInverse(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "modInverse", - args = {java.math.BigInteger.class} - ) public void test_modInverseLjava_math_BigInteger() { BigInteger a = zero, mod, inv; for (int j = 3; j < 50; j++) { @@ -751,12 +609,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#shiftRight(int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "shiftRight", - args = {int.class} - ) public void test_shiftRightI() { assertTrue("1 >> 0", BigInteger.valueOf(1).shiftRight(0).equals( BigInteger.ONE)); @@ -814,12 +666,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#shiftLeft(int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "shiftLeft", - args = {int.class} - ) public void test_shiftLeftI() { assertTrue("1 << 0", one.shiftLeft(0).equals(one)); assertTrue("1 << 1", one.shiftLeft(1).equals(two)); @@ -861,12 +707,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#multiply(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "multiply", - args = {java.math.BigInteger.class} - ) public void test_multiplyLjava_math_BigInteger() { assertTrue("Incorrect sum--wanted three zillion", aZillion .add(aZillion).add(aZillion).equals( @@ -893,12 +733,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#divide(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "divide", - args = {java.math.BigInteger.class} - ) public void test_divideLjava_math_BigInteger() { testAllDivs(bi33, bi3); testAllDivs(bi22, bi2); @@ -957,12 +791,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#remainder(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checked", - method = "remainder", - args = {java.math.BigInteger.class} - ) public void test_remainderLjava_math_BigInteger() { try { largePos.remainder(zero); @@ -992,12 +820,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#mod(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checked", - method = "mod", - args = {java.math.BigInteger.class} - ) public void test_modLjava_math_BigInteger() { try { largePos.mod(zero); @@ -1027,12 +849,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#divideAndRemainder(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "ArithmeticException checked", - method = "divideAndRemainder", - args = {java.math.BigInteger.class} - ) public void test_divideAndRemainderLjava_math_BigInteger() { try { largePos.divideAndRemainder(zero); @@ -1062,12 +878,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "NumberFormatException checking missed.", - method = "BigInteger", - args = {java.lang.String.class} - ) public void test_ConstructorLjava_lang_String() { assertTrue("new(0)", new BigInteger("0").equals(BigInteger.valueOf(0))); assertTrue("new(1)", new BigInteger("1").equals(BigInteger.valueOf(1))); @@ -1082,12 +892,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#BigInteger(java.lang.String, int) */ - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "NumberFormatException checking missed.", - method = "BigInteger", - args = {java.lang.String.class, int.class} - ) public void test_ConstructorLjava_lang_StringI() { assertTrue("new(0,16)", new BigInteger("0", 16).equals(BigInteger .valueOf(0))); @@ -1112,12 +916,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#toString() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toString", - args = {} - ) public void test_toString() { assertTrue("0.toString", "0".equals(BigInteger.valueOf(0).toString())); assertTrue("1.toString", "1".equals(BigInteger.valueOf(1).toString())); @@ -1132,12 +930,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#toString(int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toString", - args = {int.class} - ) public void test_toStringI() { assertTrue("0.toString(16)", "0".equals(BigInteger.valueOf(0).toString( 16))); @@ -1156,12 +948,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#and(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "and", - args = {java.math.BigInteger.class} - ) public void test_andLjava_math_BigInteger() { for (BigInteger[] element : booleanPairs) { BigInteger i1 = element[0], i2 = element[1]; @@ -1178,12 +964,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#or(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "or", - args = {java.math.BigInteger.class} - ) public void test_orLjava_math_BigInteger() { for (BigInteger[] element : booleanPairs) { BigInteger i1 = element[0], i2 = element[1]; @@ -1200,12 +980,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#xor(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "xor", - args = {java.math.BigInteger.class} - ) public void test_xorLjava_math_BigInteger() { for (BigInteger[] element : booleanPairs) { BigInteger i1 = element[0], i2 = element[1]; @@ -1222,12 +996,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#not() */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "not", - args = {} - ) public void test_not() { for (BigInteger[] element : booleanPairs) { BigInteger i1 = element[0]; @@ -1242,12 +1010,6 @@ public class BigIntegerTest extends junit.framework.TestCase { /** * @tests java.math.BigInteger#andNot(java.math.BigInteger) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "andNot", - args = {java.math.BigInteger.class} - ) public void test_andNotLjava_math_BigInteger() { for (BigInteger[] element : booleanPairs) { BigInteger i1 = element[0], i2 = element[1]; @@ -1279,12 +1041,6 @@ public class BigIntegerTest extends junit.framework.TestCase { } - @TestTargetNew( - level = TestLevel.PARTIAL, - notes = "Regression test", - method = "clone", - args = {} - ) public void testClone() { // Regression test for HARMONY-1770 MyBigInteger myBigInteger = new MyBigInteger("12345"); diff --git a/math/src/test/java/tests/api/java/math/MathContextTest.java b/math/src/test/java/tests/api/java/math/MathContextTest.java index 0051b44..dadfd12 100644 --- a/math/src/test/java/tests/api/java/math/MathContextTest.java +++ b/math/src/test/java/tests/api/java/math/MathContextTest.java @@ -17,71 +17,15 @@ package tests.api.java.math; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; -@TestTargetClass(MathContext.class) public class MathContextTest extends junit.framework.TestCase { /** * @tests java.math.MathContext#MathContext(...) */ - @TestTargets({ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "MathContext", - args = {int.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "MathContext", - args = {int.class, java.math.RoundingMode.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "MathContext", - args = {java.lang.String.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getPrecision", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "getRoundingMode", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "equals", - args = {java.lang.Object.class} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "hashCode", - args = {} - ), - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "toString", - args = {} - ) - }) public void test_MathContextConstruction() { String a = "-12380945E+61"; BigDecimal aNumber = new BigDecimal(a); @@ -132,4 +76,4 @@ public class MathContextTest extends junit.framework.TestCase { res); } -}
\ No newline at end of file +} diff --git a/math/src/test/java/tests/api/java/math/RoundingModeTest.java b/math/src/test/java/tests/api/java/math/RoundingModeTest.java index e0946b3..1549301 100644 --- a/math/src/test/java/tests/api/java/math/RoundingModeTest.java +++ b/math/src/test/java/tests/api/java/math/RoundingModeTest.java @@ -17,26 +17,14 @@ package tests.api.java.math; -import dalvik.annotation.TestTargets; -import dalvik.annotation.TestLevel; -import dalvik.annotation.TestTargetNew; -import dalvik.annotation.TestTargetClass; - import java.math.BigDecimal; import java.math.RoundingMode; -@TestTargetClass(RoundingMode.class) public class RoundingModeTest extends junit.framework.TestCase { /** * @tests java.math.RoundingMode#valueOf(int) */ - @TestTargetNew( - level = TestLevel.COMPLETE, - notes = "", - method = "valueOf", - args = {int.class} - ) public void test_valueOfI() { assertEquals("valueOf failed for ROUND_CEILING", RoundingMode.valueOf(BigDecimal.ROUND_CEILING), RoundingMode.CEILING); assertEquals("valueOf failed for ROUND_DOWN", RoundingMode.valueOf(BigDecimal.ROUND_DOWN), RoundingMode.DOWN); |