Revision: 4118
          http://vexi.svn.sourceforge.net/vexi/?rev=4118&view=rev
Author:   clrg
Date:     2011-05-10 02:15:59 +0000 (Tue, 10 May 2011)

Log Message:
-----------
Fix edit test

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_test/test/lib/text/edit.t

Modified: trunk/org.vexi-vexi.widgets/src_test/test/lib/text/edit.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_test/test/lib/text/edit.t   2011-05-09 
21:05:47 UTC (rev 4117)
+++ trunk/org.vexi-vexi.widgets/src_test/test/lib/text/edit.t   2011-05-10 
02:15:59 UTC (rev 4118)
@@ -9,40 +9,40 @@
     var vunit = vexi..vexi.test.vunit;
     var assertEq = vunit..assertEq;
 
-    suite.text_read_write = function() {
-        var b = .edit(vexi.box);
+    suite.test_text_read_write = function() {
+        var b = new .edit();
         b.text = "1.00";
         assertEq("1.00", b.text);
         b.text = "sausage";
         assertEq("sausage", b.text);
     };
     
-    suite.getCursorPosition = function() {
-        var b1 = .edit(vexi.box);
+    suite.test_getCursorCharIndex = function() {
+        var b1 = new .edit();
         b1.text = "sausage";
         b1.width = 200;
-        assertEq(0, b1.getCursorPosition());
+        assertEq(0, b1.getCursorCharIndex());
         b1.KeyPressed = "a";
         b1.KeyPressed = " ";
-        assertEq(2, b1.getCursorPosition());
-        b1.KeyPressed = "arrow_right";
-        b1.KeyPressed = "arrow_right";
-        assertEq(4, b1.getCursorPosition());
+        assertEq(2, b1.getCursorCharIndex());
+        b1.KeyPressed = "right";
+        b1.KeyPressed = "right";
+        assertEq(4, b1.getCursorCharIndex());
         b1.KeyPressed = "end";
-        assertEq(9, b1.getCursorPosition());
+        assertEq(9, b1.getCursorCharIndex());
     };
 
-    suite.setCursorPosition = function() {
-        var b1 = .edit(vexi.box);
+    suite.test_setCursorCharIndex = function() {
+        var b1 = new .edit();
         b1.text = "sausage and beans";
         b1.setCursorCharIndex(3);
-        assertEq(3, b1.getCursorPosition());
+        assertEq(3, b1.getCursorCharIndex());
         b1.setCursorCharIndex(7);
-        assertEq(7, b1.getCursorPosition());
+        assertEq(7, b1.getCursorCharIndex());
         b1.setCursorCharIndex(10);
-        assertEq(10, b1.getCursorPosition());
+        assertEq(10, b1.getCursorCharIndex());
         b1.setCursorCharIndex(17);
-        assertEq(17, b1.getCursorPosition());
+        assertEq(17, b1.getCursorCharIndex());
     };    
 
     static.test = suite;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to