[Groonga-commit] groonga/grnxx at f9ae9fb [master] Add a test for String::clone().

Back to archive index

susumu.yata null+****@clear*****
Tue Dec 16 10:46:45 JST 2014


susumu.yata	2014-11-27 21:18:53 +0900 (Thu, 27 Nov 2014)

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

  Message:
    Add a test for String::clone().

  Modified files:
    test/test_string.cpp

  Modified: test/test_string.cpp (+12 -0)
===================================================================
--- test/test_string.cpp    2014-11-27 21:18:40 +0900 (44e446c)
+++ test/test_string.cpp    2014-11-27 21:18:53 +0900 (6eefdfc)
@@ -123,7 +123,19 @@ void test_string() {
   }
 }
 
+void test_clone() {
+  grnxx::String original;
+  original.assign("abc");
+
+  grnxx::String clone(original.clone());
+  original.assign("def");
+
+  assert(original == "def");
+  assert(clone == "abc");
+}
+
 int main() {
   test_string();
+  test_clone();
   return 0;
 }
-------------- next part --------------
HTML����������������������������...
다운로드 



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