You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2006/10/20 09:51:32 UTC

svn commit: r466025 - /incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_PositionTest.java

Author: hindessm
Date: Fri Oct 20 00:51:29 2006
New Revision: 466025

URL: http://svn.apache.org/viewvc?view=rev&rev=466025
Log:
Applied patch from "[#HARMONY-1917] [classlib][swing][test] unit test
fails: j.s.t.GapContent_PositionTest.testShiftGapLeft".

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_PositionTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_PositionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_PositionTest.java?view=diff&rev=466025&r1=466024&r2=466025
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_PositionTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_PositionTest.java Fri Oct 20 00:51:29 2006
@@ -37,17 +37,27 @@
      * Offsets in the document when the document is not changed.
      */
     private static final int[] offsets = {0, 5, 10, 15, 20};
+    private Position[] positions;
 
     protected void setUp() throws Exception {
+        super.setUp();
         content = new GapContent(30);
         content.insertString(0, "This is a test string.");
         content.shiftGap(7);
 
         // Add some positions to the content
         int[] offsets = {0, 10, 5, 20, 15};
+        positions = new Position[offsets.length];
         for (int i = 0; i < offsets.length; i++) {
-            content.createPosition(offsets[i]);
+            positions[i] = content.createPosition(offsets[i]);
         }
+    }
+    
+    protected void tearDown() throws Exception {
+        for (int i = 0; i < offsets.length; i++) {
+            positions[i] = null;
+        }
+        super.tearDown();
     }
 
     public void testShiftGapLeft() {