You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ay...@apache.org on 2006/11/14 15:08:17 UTC

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

Author: ayza
Date: Tue Nov 14 06:08:16 2006
New Revision: 474796

URL: http://svn.apache.org/viewvc?view=rev&rev=474796
Log:
applying patch from HARMONY-2161 ([classlib][swing][test] unit test fails: j.s.text.GapContent_GapVectorTest)

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_GapVectorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_GapVectorTest.java?view=diff&rev=474796&r1=474795&r2=474796
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_GapVectorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/text/GapContent_GapVectorTest.java Tue Nov 14 06:08:16 2006
@@ -14,11 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
-/**
- * @author Alexey A. Ivanov
- * @version $Revision$
- */
 package javax.swing.text;
 
 import junit.framework.TestCase;
@@ -26,7 +21,7 @@
 public class GapContent_GapVectorTest extends TestCase {
     private GapContent gv;
 
-
+    @Override
     protected void setUp() throws BadLocationException {
         gv = new GapContent(20);
         gv.insertString(0, "abcdefghij");
@@ -79,9 +74,15 @@
         assertEquals(1, gv.getGapStart());
     }
 
+    public void testInsertStringEnd() throws BadLocationException {
+        gv.insertString(11, "z");
+        assertEquals(12, gv.getGapStart());
+        assertEquals("abcdefghij\nz", gv.getString(0, gv.length()));
+    }
+
     public void testInsertStringInvalid() {
         try {
-            gv.insertString(11, "z");
+            gv.insertString(12, "z");
 
             fail("BadLocationException must be thrown");
         } catch (BadLocationException e) { }