harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463619 - in /incubator/harmony/enhanced/classlib/trunk/modules: prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/ print/src/test/api/java/common/javax/print/ print/src/test/api/java/common/javax/print/attribute/ print/src...
Date Fri, 13 Oct 2006 10:03:45 GMT
Author: hindessm
Date: Fri Oct 13 03:03:44 2006
New Revision: 463619

URL: http://svn.apache.org/viewvc?view=rev&rev=463619
Log:
Converting things like:

  assertTrue(blah == [true|false|null]) to assert[True|False|Null]
  assertEquals(blah, [true,false,null]) to assert[True|False|Null]
  assertEquals([true,false,null], blah) to assert[True|False|Null]

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/DocFlavorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/ValueTests.java
    incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/HashAttributeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/standard/MediaSizeTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java?view=diff&rev=463619&r1=463618&r2=463619
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/prefs/src/test/java/org/apache/harmony/prefs/tests/java/util/prefs/AbstractPreferencesTest.java
Fri Oct 13 03:03:44 2006
@@ -215,8 +215,8 @@
 		assertEquals("testClearValue", pref.get("testClearKey", null));
 		assertEquals("testClearValue1", pref.get("testClearKey1", null));
 		pref.clear();
-		assertEquals(null, pref.get("testClearKey", null));
-		assertEquals(null, pref.get("testClearKey1", null));
+		assertNull(pref.get("testClearKey", null));
+		assertNull(pref.get("testClearKey1", null));
 	}
 
 	public void testGet() throws BackingStoreException {
@@ -260,8 +260,8 @@
 
 		pref.put("testGetBooleanKey", "false");
 		pref.put("testGetBooleanKey2", "value");
-		assertEquals(false, pref.getBoolean("testGetBooleanKey", true));
-		assertEquals(true, pref.getBoolean("testGetBooleanKey2", true));
+		assertFalse(pref.getBoolean("testGetBooleanKey", true));
+		assertTrue(pref.getBoolean("testGetBooleanKey2", true));
 	}
 
 	public void testPutByteArray() {
@@ -621,7 +621,7 @@
 		}
 		pref.putBoolean("testPutBooleanKey", false);
 		assertEquals("false", pref.get("testPutBooleanKey", null));
-		assertEquals(false, pref.getBoolean("testPutBooleanKey", true));
+		assertFalse(pref.getBoolean("testPutBooleanKey", true));
 	}
 
 	public void testPutDouble() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/DocFlavorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/DocFlavorTest.java?view=diff&rev=463619&r1=463618&r2=463619
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/DocFlavorTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/DocFlavorTest.java
Fri Oct 13 03:03:44 2006
@@ -98,7 +98,7 @@
     DocFlavor f =
             new DocFlavor("TEXT/plain; BBB=par1; aaa=par2 (comments)", "[B");
     assertEquals(f.getParameter("bbb"), new String("par1"));
-    assertEquals(f.getParameter("absent"), null);
+    assertNull(f.getParameter("absent"));
 }
 
 public void testGetRepresentationClassName() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/ValueTests.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/ValueTests.java?view=diff&rev=463619&r1=463618&r2=463619
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/ValueTests.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/ValueTests.java
Fri Oct 13 03:03:44 2006
@@ -112,7 +112,7 @@
     assertEquals(doc.getDocFlavor(), DocFlavor.INPUT_STREAM.GIF);
     try {
         assertTrue(doc.getPrintData() instanceof java.io.InputStream);
-        assertEquals(doc.getReaderForText(), null);
+        assertNull(doc.getReaderForText());
         assertEquals(doc.getStreamForBytes(), reader);
     } catch(Exception e) {
         e.printStackTrace();
@@ -225,7 +225,7 @@
     }
     assertTrue(flg);
     streamService.dispose();
-    assertEquals(streamService.isDisposed(), true);
+    assertTrue(streamService.isDisposed());
 }
 
 public void testStreamServicePrinting() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/HashAttributeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/HashAttributeTest.java?view=diff&rev=463619&r1=463618&r2=463619
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/HashAttributeTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/HashAttributeTest.java
Fri Oct 13 03:03:44 2006
@@ -92,7 +92,7 @@
                             +att1+", att2 = "+att2,
                                         att1 == att2 );
             assertTrue("Attribute set doesn't contain added attribute value",
-                            aset.containsValue(PrintQuality.HIGH) == true );
+                            aset.containsValue(PrintQuality.HIGH));
         }else{
             fail("add() == false");
         }
@@ -110,11 +110,11 @@
 
         Attribute att = new Copies(10);
         aset.add(att);
-        assertTrue(aset.add(att) == false);
+        assertFalse(aset.add(att));
 
         att = Sides.DUPLEX;
         aset.add(att);
-        assertTrue(aset.add(att) == false);
+        assertFalse(aset.add(att));
 
     }
 
@@ -209,7 +209,7 @@
         aset.add(SheetCollate.COLLATED);
         if (aset.get(SheetCollate.class) != null) {
             aset.clear();
-            assertEquals(null, aset.get(SheetCollate.class));
+            assertNull(aset.get(SheetCollate.class));
         } else {
             fail("add() or get() works wrong");
         }
@@ -218,8 +218,8 @@
         aset.add(ColorSupported.SUPPORTED);
         if ( !aset.isEmpty() ) {
             aset.clear();
-            assertEquals(null, aset.get(SheetCollate.class));
-            assertEquals(null, aset.get(ColorSupported.class));
+            assertNull(aset.get(SheetCollate.class));
+            assertNull(aset.get(ColorSupported.class));
         } else {
             fail("add() or isEmpty() works wrong");
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/standard/MediaSizeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/standard/MediaSizeTest.java?view=diff&rev=463619&r1=463618&r2=463619
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/standard/MediaSizeTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/print/src/test/api/java/common/javax/print/attribute/standard/MediaSizeTest.java
Fri Oct 13 03:03:44 2006
@@ -206,7 +206,7 @@
         assertEquals(MediaSizeName.JIS_B0, ms.getMediaSizeName());
 
         ms = new MediaSize(30, 30, MediaSize.INCH);
-        assertEquals(null, ms.getMediaSizeName());
+        assertNull(ms.getMediaSizeName());
     }
 
     /*



Mime
View raw message