[Groonga-commit] groonga/grnxx at e01d817 [master] Add a test for StringCRef. (#75)

Back to archive index

susumu.yata null+****@clear*****
Fri Sep 26 15:09:33 JST 2014


susumu.yata	2014-09-26 15:09:33 +0900 (Fri, 26 Sep 2014)

  New Revision: e01d817bfe33ae6f3a81b5b81fbbf6c8b90f40f3
  https://github.com/groonga/grnxx/commit/e01d817bfe33ae6f3a81b5b81fbbf6c8b90f40f3

  Message:
    Add a test for StringCRef. (#75)

  Modified files:
    test/test_string.cpp

  Modified: test/test_string.cpp (+5 -0)
===================================================================
--- test/test_string.cpp    2014-09-26 14:35:46 +0900 (dc2655b)
+++ test/test_string.cpp    2014-09-26 15:09:33 +0900 (d06333a)
@@ -51,6 +51,11 @@ void test_string_cref() {
   }
 
   for (grnxx::Int i = 0; i < NUM_STRINGS; ++i) {
+    assert(refs[i].size() == static_cast<grnxx::Int>(strings[i].size()));
+    for (grnxx::Int j = 0; j < refs[i].size(); ++j) {
+      assert(refs[i][j] == strings[i][j]);
+    }
+
     for (grnxx::Int j = 0; j < NUM_STRINGS; ++j) {
       assert((refs[i] == refs[j]) == (strings[i] == strings[j]));
       assert((refs[i] != refs[j]) == (strings[i] != strings[j]));
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index