]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-dencoder: CompatSet
authorSage Weil <sage.weil@dreamhost.com>
Mon, 6 Feb 2012 05:28:11 +0000 (21:28 -0800)
committerSage Weil <sage@newdream.net>
Mon, 6 Feb 2012 21:33:59 +0000 (13:33 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/include/CompatSet.h
src/test/encoding/types.h

index 70663abd9b07b36d786b403bdf346b65ccd19a92..1c18d6193a984b92d6b4eef7bd49c23799ed239e 100644 (file)
@@ -165,6 +165,15 @@ struct CompatSet {
     incompat.dump(f);
     f->close_section();
   }
+
+  static void generate_test_instances(list<CompatSet*>& o) {
+    o.push_back(new CompatSet);
+    o.push_back(new CompatSet);
+    o.back()->compat.insert(Feature(1, "one"));
+    o.back()->compat.insert(Feature(2, "two"));
+    o.back()->ro_compat.insert(Feature(4, "four"));
+    o.back()->incompat.insert(Feature(3, "three"));
+  }
 };
 WRITE_CLASS_ENCODER(CompatSet)
 
index e04db795539913b154739eea3c8c3bd86e576bae..86c99682be97d1f8d6183b64f87149f6e30cdb23 100644 (file)
@@ -1,3 +1,5 @@
+#include "include/CompatSet.h"
+TYPE(CompatSet)
 
 #include "msg/msg_types.h"
 TYPE(entity_name_t)