[Groonga-commit] groonga/grnxx at 88d1f9a [master] Add a test for move assignment of Array<Bool>.

Back to archive index

susumu.yata null+****@clear*****
Fri Sep 5 16:54:30 JST 2014


susumu.yata	2014-09-05 16:54:30 +0900 (Fri, 05 Sep 2014)

  New Revision: 88d1f9af413f7d664f80a644e76c6c80379e24b7
  https://github.com/groonga/grnxx/commit/88d1f9af413f7d664f80a644e76c6c80379e24b7

  Message:
    Add a test for move assignment of Array<Bool>.

  Modified files:
    test/test_array.cpp

  Modified: test/test_array.cpp (+7 -0)
===================================================================
--- test/test_array.cpp    2014-09-05 16:45:28 +0900 (c5da81c)
+++ test/test_array.cpp    2014-09-05 16:54:30 +0900 (e4981d1)
@@ -76,6 +76,13 @@ void test_bool() {
   for (grnxx::Int i = 0; i < NUM_ROWS; ++i) {
     assert(array[i] == values[i]);
   }
+
+  grnxx::Array<grnxx::Bool> array2;
+  array2 = std::move(array);
+  assert(array.size() == 0);
+  assert(array.capacity() == 0);
+  assert(array2.size() == NUM_ROWS);
+  assert(array2.capacity() == NUM_ROWS);
 }
 
 int main() {
-------------- next part --------------
HTML����������������������������...
下載 



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