[Groonga-commit] groonga/groonga [master] note: cppcut_assert_equal doesn't work for grn::dat::Base. hmm...

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 10日 (木) 10:08:18 JST


Susumu Yata	2011-11-10 01:08:18 +0000 (Thu, 10 Nov 2011)

  New Revision: 883f1dcb2b90d4110960f585eb20814db6bc93ff

  Merged 770d028: Merge branch 'master' of github.com:groonga/groonga

  Log:
    note: cppcut_assert_equal doesn't work for grn::dat::Base. hmm...

  Modified files:
    test/unit/core/dat/test-node.cpp

  Modified: test/unit/core/dat/test-node.cpp (+16 -0)
===================================================================
--- test/unit/core/dat/test-node.cpp    2011-11-09 11:08:30 +0000 (620229b)
+++ test/unit/core/dat/test-node.cpp    2011-11-10 01:08:18 +0000 (896d539)
@@ -22,6 +22,21 @@
 #include <grn-assertions.h>
 #include <dat/node.hpp>
 
+#include <iostream>
+
+namespace
+{
+  std::ostream &operator<<(std::ostream &stream, const grn::dat::Base &base)
+  {
+    if (base.is_linker()) {
+      stream << "linker: " << base.key_pos();
+    } else {
+      stream << "non-linker: " << base.offset();
+    }
+    return stream;
+  }
+}
+
 namespace test_dat_node
 {
   void test_base(void)
@@ -30,6 +45,7 @@ namespace test_dat_node
     grn::dat::Base base;
 
     cut_assert(node.base() == base);
+    cppcut_assert_equal(node.base(), base);
 
     node.set_key_pos(100);
     base.set_key_pos(100);




Groonga-commit メーリングリストの案内
Back to archive index