]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed unit tests for cursor movement
authorMike Lowis <mike.lowis@gentex.com>
Fri, 7 Oct 2016 15:24:45 +0000 (11:24 -0400)
committerMike Lowis <mike.lowis@gentex.com>
Fri, 7 Oct 2016 15:24:45 +0000 (11:24 -0400)
tests/buf.c

index 8621735d791c7f2af765d25c17a279342f38245f..e9e449ccff28dd781e8ce3a3502e99971bf98c28 100644 (file)
@@ -104,16 +104,16 @@ TEST_SUITE(BufferTests) {
         CHECK(0 == buf_byrune(&TestBuf, 0, -2));
     }
 
-    TEST(buf_byrune should do nothing for +1 at end of file)
+    TEST(buf_byrune should move to just after last rune for +1 at end of file)
     {
         set_buffer_text("abc\n");
-        CHECK(3 == buf_byrune(&TestBuf, 3, 1));
+        CHECK(4 == buf_byrune(&TestBuf, 3, 1));
     }
 
-    TEST(buf_byrune should do nothing for +2 at end of file)
+    TEST(buf_byrune should move to just after last rune for +2 at end of file)
     {
         set_buffer_text("abc\n");
-        CHECK(3 == buf_byrune(&TestBuf, 3, 2));
+        CHECK(4 == buf_byrune(&TestBuf, 3, 2));
     }
 
     //TEST(buf_byrune should skip newlines for -1)