summaryrefslogtreecommitdiff
path: root/test/testStructures.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-03-05 03:28:53 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-03-05 03:28:53 +0000
commitc21b0f14a33f4c3121e643d45517965895211080 (patch)
tree31f8c5083c3ca87db93a7783693759d5e8480726 /test/testStructures.cpp
parentUnify asset factory perf tests as it's now a combined load/create operation (diff)
downloadilt-c21b0f14a33f4c3121e643d45517965895211080.tar.bz2
ilt-c21b0f14a33f4c3121e643d45517965895211080.tar.xz
ilt-c21b0f14a33f4c3121e643d45517965895211080.zip
Move persistence test objects to test library
Diffstat (limited to 'test/testStructures.cpp')
-rw-r--r--test/testStructures.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/test/testStructures.cpp b/test/testStructures.cpp
new file mode 100644
index 0000000..8305078
--- /dev/null
+++ b/test/testStructures.cpp
@@ -0,0 +1,49 @@
+#include "testStructures.h"
+
+bool
+AbsObject::persist(Persistence::PersistenceStore & store)
+{
+ return STORE_TYPE && STORE_MEMBER(base);
+}
+
+bool
+SubObject::persist(Persistence::PersistenceStore & store)
+{
+ return STORE_TYPE && AbsObject::persist(store) && STORE_MEMBER(sub);
+}
+
+void
+SubObject::dummy() const
+{
+}
+
+std::string
+SubObject::getId() const
+{
+ return "someid";
+}
+
+bool
+SubObject2::persist(Persistence::PersistenceStore & store)
+{
+ return STORE_TYPE && AbsObject::persist(store);
+}
+
+void
+SubObject2::dummy() const
+{
+}
+
+bool
+TestObject::persist(Persistence::PersistenceStore & store)
+{
+ return STORE_TYPE && STORE_MEMBER(flt) && STORE_MEMBER(str) && STORE_MEMBER(bl) && STORE_MEMBER(pos)
+ && STORE_MEMBER(flts) && STORE_MEMBER(poss) && STORE_MEMBER(nest) && STORE_MEMBER(ptr) && STORE_MEMBER(aptr)
+ && STORE_MEMBER(vptr);
+}
+
+bool
+SharedTestObject::persist(Persistence::PersistenceStore & store)
+{
+ return STORE_TYPE && STORE_MEMBER(sptr) && STORE_MEMBER(ssptr);
+}