You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by fl...@apache.org on 2012/10/22 16:47:48 UTC

svn commit: r1400899 - in /incubator/jspwiki/trunk: ChangeLog build.xml src/org/apache/wiki/Release.java tests/org/apache/wiki/util/CommentedPropertiesTest.java

Author: florianh
Date: Mon Oct 22 14:47:48 2012
New Revision: 1400899

URL: http://svn.apache.org/viewvc?rev=1400899&view=rev
Log:
2.9.0-incubating-13
fixed CommentedPropertiesTest, which broke because of the recent license header changes
build target tests-init now depends on init instead of mkpropertyfile

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/build.xml
    incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/tests/org/apache/wiki/util/CommentedPropertiesTest.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1400899&r1=1400898&r2=1400899&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Mon Oct 22 14:47:48 2012
@@ -1,5 +1,11 @@
 2012-10-22  Florian Holeczek (florianh AT apache DOT org)
 
+       * 2.9.0-incubating-13
+       
+       * fixed CommentedPropertiesTest, which broke because of the recent license header changes
+
+2012-10-22  Florian Holeczek (florianh AT apache DOT org)
+
        * adjusted Ant target "rat-report"
 
        * added license headers to further files

Modified: incubator/jspwiki/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/build.xml?rev=1400899&r1=1400898&r2=1400899&view=diff
==============================================================================
--- incubator/jspwiki/trunk/build.xml (original)
+++ incubator/jspwiki/trunk/build.xml Mon Oct 22 14:47:48 2012
@@ -762,7 +762,7 @@
 
   <!-- Running tests -->
 
-  <target name="tests-init" depends="mkpropertyfile">
+  <target name="tests-init" depends="init">
       <!-- Build up the /etc directory for testing -->
       <delete file="tests/etc/userdatabase.xml" />
       <delete file="tests/etc/userdatabase.xml.old" />

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/Release.java?rev=1400899&r1=1400898&r2=1400899&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/Release.java Mon Oct 22 14:47:48 2012
@@ -75,7 +75,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "12";
+    public static final String     BUILD         = "13";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/tests/org/apache/wiki/util/CommentedPropertiesTest.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/org/apache/wiki/util/CommentedPropertiesTest.java?rev=1400899&r1=1400898&r2=1400899&view=diff
==============================================================================
--- incubator/jspwiki/trunk/tests/org/apache/wiki/util/CommentedPropertiesTest.java (original)
+++ incubator/jspwiki/trunk/tests/org/apache/wiki/util/CommentedPropertiesTest.java Mon Oct 22 14:47:48 2012
@@ -35,7 +35,10 @@ import junit.framework.TestSuite;
 
 public class CommentedPropertiesTest extends TestCase
 {
+    
     Properties m_props = new CommentedProperties();
+    // file size of the properties test file in bytes
+    private final int m_propFileSize = 1008;
     
     public void setUp() throws IOException
     {
@@ -54,8 +57,8 @@ public class CommentedPropertiesTest ext
         assertEquals( "BarAgain", m_props.get( "testProp5" ) );
         assertNull( m_props.get( "testProp6" ) );
         
-        // String we read in, including comments is 208 bytes
-        assertEquals( 208, m_props.toString().length() );
+        // String we read in, including comments is c_stringOffset bytes
+        assertEquals( m_propFileSize, m_props.toString().length() );
     }
     
     public void testSetProperty()
@@ -63,14 +66,14 @@ public class CommentedPropertiesTest ext
         m_props.setProperty( "testProp1", "newValue" );
         
         // Length of stored string should now be 5 bytes more
-        assertEquals( 208+5, m_props.toString().length() );
+        assertEquals( m_propFileSize+5, m_props.toString().length() );
         assertTrue( m_props.toString().indexOf( "newValue" ) != -1 );
         
         // Create new property; should add 21 (1+7+3+9+1) bytes
         m_props.setProperty( "newProp", "newValue2" );
         m_props.containsKey( "newProp" );
         m_props.containsValue( "newValue2" );
-        assertEquals( 208+5+21, m_props.toString().length() );
+        assertEquals( m_propFileSize+5+21, m_props.toString().length() );
         assertTrue( m_props.toString().indexOf( "newProp = newValue2" ) != -1 );
     }
     
@@ -79,27 +82,27 @@ public class CommentedPropertiesTest ext
         // Remove prop 1; length of stored string should be 14 (1+9+1+3) bytes less
         m_props.remove( "testProp1" );
         assertFalse( m_props.containsKey( "testProp1" ) );
-        assertEquals( 208-14, m_props.toString().length() );
+        assertEquals( m_propFileSize-14, m_props.toString().length() );
         
         // Remove prop 2; length of stored string should be 15 (1+9+2+3) bytes less
         m_props.remove( "testProp2" );
         assertFalse( m_props.containsKey( "testProp2" ) );
-        assertEquals( 208-14-15, m_props.toString().length() );
+        assertEquals( m_propFileSize-14-15, m_props.toString().length() );
         
         // Remove prop 3; length of stored string should be 11 (1+9+1) bytes less
         m_props.remove( "testProp3" );
         assertFalse( m_props.containsKey( "testProp3" ) );
-        assertEquals( 208-14-15-11, m_props.toString().length() );
+        assertEquals( m_propFileSize-14-15-11, m_props.toString().length() );
         
         // Remove prop 4; length of stored string should be 19 (1+9+1+8) bytes less
         m_props.remove( "testProp4" );
         assertFalse( m_props.containsKey( "testProp4" ) );
-        assertEquals( 208-14-15-11-19, m_props.toString().length() );
+        assertEquals( m_propFileSize-14-15-11-19, m_props.toString().length() );
         
         // Remove prop 5; length of stored string should be 19 (1+9+1+8) bytes less
         m_props.remove( "testProp5" );
         assertFalse( m_props.containsKey( "testProp5" ) );
-        assertEquals( 208-14-15-11-19-19, m_props.toString().length() );
+        assertEquals( m_propFileSize-14-15-11-19-19, m_props.toString().length() );
     }
     
     public void testStore() throws Exception