[gnome-commander/googletest] Inserts a googletest comparison



commit ce48f10387ca1b611ab2c89b4982758702c0f2c2
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Sun Oct 18 22:01:29 2015 +0200

    Inserts a googletest comparison

 tests/iv_bm_byte_test.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/tests/iv_bm_byte_test.cc b/tests/iv_bm_byte_test.cc
index 49c4237..68a32eb 100644
--- a/tests/iv_bm_byte_test.cc
+++ b/tests/iv_bm_byte_test.cc
@@ -65,6 +65,8 @@ TEST_F(BmByteTest, match_test) {
     }
     printf("(All other characters have value of %d)\n\n", data->pattern_len);
 
+    // Do the actual search: The test search should find a match at 
+    // position 142 and 248, nowhere else in the sample text.
     int m = data->pattern_len;
     int n = sizeof(text);
     int i; 
@@ -73,6 +75,7 @@ TEST_F(BmByteTest, match_test) {
         for (i = m - 1; i >= 0 && pattern[i] == text[i + j]; --i);
         if (i < 0) {
             printf(" Found match at offset = %d\n", j);
+            ASSERT_TRUE(j == 142 || j == 248);
             j += data->good[0];
         }
         else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]