freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: (Test cleanup)
Date Sun, 12 Mar 2017 13:43:40 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 8b1bb9a32 -> 2bd41412e


(Test cleanup)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/2bd41412
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/2bd41412
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/2bd41412

Branch: refs/heads/3
Commit: 2bd41412e5b7e90adbcf72925dc4612c21488c31
Parents: 8b1bb9a
Author: ddekany <ddekany@apache.org>
Authored: Sun Mar 12 14:43:34 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Sun Mar 12 14:43:34 2017 +0100

----------------------------------------------------------------------
 .../DefaultObjectWrapperSingletonsTest.java     | 30 +++++++++-----------
 1 file changed, 13 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/2bd41412/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperSingletonsTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperSingletonsTest.java
b/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperSingletonsTest.java
index 485ef45..cf84333 100644
--- a/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperSingletonsTest.java
+++ b/src/test/java/org/apache/freemarker/core/model/impl/DefaultObjectWrapperSingletonsTest.java
@@ -67,51 +67,51 @@ public class DefaultObjectWrapperSingletonsTest extends TestCase {
         
         builder1.setExposeFields(true);
         assertNotEquals(builder1, builder2);
-        assertFalse(builder1.hashCode() == builder2.hashCode());
+        assertNotEquals(builder1.hashCode(), builder2.hashCode());
         builder2.setExposeFields(true);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
         
         builder1.setExposureLevel(0);
         assertNotEquals(builder1, builder2);
-        assertFalse(builder1.hashCode() == builder2.hashCode());
+        assertNotEquals(builder1.hashCode(), builder2.hashCode());
         builder2.setExposureLevel(0);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
         
         builder1.setExposureLevel(1);
         assertNotEquals(builder1, builder2);
-        assertFalse(builder1.hashCode() == builder2.hashCode());
+        assertNotEquals(builder1.hashCode(), builder2.hashCode());
         builder2.setExposureLevel(1);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
         
         builder1.setDefaultDateType(TemplateDateModel.DATE);
         assertNotEquals(builder1, builder2);
         builder2.setDefaultDateType(TemplateDateModel.DATE);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
         
         builder1.setStrict(true);
         assertNotEquals(builder1, builder2);
-        assertFalse(builder1.hashCode() == builder2.hashCode());
+        assertNotEquals(builder1.hashCode(), builder2.hashCode());
         builder2.setStrict(true);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
 
         builder1.setUseModelCache(true);
         assertNotEquals(builder1, builder2);
-        assertFalse(builder1.hashCode() == builder2.hashCode());
+        assertNotEquals(builder1.hashCode(), builder2.hashCode());
         builder2.setUseModelCache(true);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
         
         AlphabeticalMethodSorter ms = new AlphabeticalMethodSorter(true);
         builder1.setMethodSorter(ms);
         assertNotEquals(builder1, builder2);
         builder2.setMethodSorter(ms);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
 
         MethodAppearanceFineTuner maft = new MethodAppearanceFineTuner() {
             @Override
@@ -121,7 +121,7 @@ public class DefaultObjectWrapperSingletonsTest extends TestCase {
         assertNotEquals(builder1, builder2);
         builder2.setMethodAppearanceFineTuner(maft);
         assertEquals(builder1, builder2);
-        assertTrue(builder1.hashCode() == builder2.hashCode());
+        assertEquals(builder1.hashCode(), builder2.hashCode());
     }
     
     public void testDefaultObjectWrapperBuilderProducts() throws Exception {
@@ -574,10 +574,6 @@ public class DefaultObjectWrapperSingletonsTest extends TestCase {
         assertEquals(expectedSize, getClassIntrospectorInstanceCacheSize());
     }
 
-    private void assertNotEquals(Object o1, Object o2) {
-        assertFalse(o1.equals(o2));
-    }
-    
     public class C {
         
         public String foo = "FOO";


Mime
View raw message