summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-04-30 01:03:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-07 16:41:37 +0000
commita31858d29048735b812d385f75db4ed6a6a94556 (patch)
treefffd08d958c4970be617b3ad36905b54f2445bad /test
parentImplement shared_ptr support (diff)
downloadilt-a31858d29048735b812d385f75db4ed6a6a94556.tar.bz2
ilt-a31858d29048735b812d385f75db4ed6a6a94556.tar.xz
ilt-a31858d29048735b812d385f75db4ed6a6a94556.zip
Fix the fact I've been spelling persistence wrong this whole time
Diffstat (limited to 'test')
-rw-r--r--test/Jamfile.jam2
-rw-r--r--test/test-persistence.cpp (renamed from test/test-persistance.cpp)22
2 files changed, 12 insertions, 12 deletions
diff --git a/test/Jamfile.jam b/test/Jamfile.jam
index cfa1f21..2c09b8a 100644
--- a/test/Jamfile.jam
+++ b/test/Jamfile.jam
@@ -19,4 +19,4 @@ run test-collection.cpp ;
run test-obj.cpp ;
run test-maths.cpp ;
run test-network.cpp ;
-run test-persistance.cpp : -- : [ sequence.insertion-sort [ glob fixtures/json/*.json ] ] ;
+run test-persistence.cpp : -- : [ sequence.insertion-sort [ glob fixtures/json/*.json ] ] ;
diff --git a/test/test-persistance.cpp b/test/test-persistence.cpp
index 2c06c48..d5910e9 100644
--- a/test/test-persistance.cpp
+++ b/test/test-persistence.cpp
@@ -1,20 +1,20 @@
-#define BOOST_TEST_MODULE test_persistance
+#define BOOST_TEST_MODULE test_persistence
#include <boost/test/unit_test.hpp>
#include <glm/glm.hpp>
#include <iosfwd>
-#include <jsonParse-persistance.h>
+#include <jsonParse-persistence.h>
#include <memory>
#include <stdexcept>
#include <string>
#include <vector>
-struct AbsObject : public Persistanace::Persistable {
+struct AbsObject : public Persistence::Persistable {
std::string base;
bool
- persist(Persistanace::PersistanceStore & store) override
+ persist(Persistence::PersistenceStore & store) override
{
return STORE_TYPE && STORE_MEMBER(base);
}
@@ -26,7 +26,7 @@ struct SubObject : public AbsObject {
std::string sub;
bool
- persist(Persistanace::PersistanceStore & store) override
+ persist(Persistence::PersistenceStore & store) override
{
return AbsObject::persist(store) && STORE_TYPE && STORE_MEMBER(sub);
}
@@ -37,7 +37,7 @@ struct SubObject : public AbsObject {
}
};
-struct TestObject : public Persistanace::Persistable {
+struct TestObject : public Persistence::Persistable {
TestObject() = default;
float flt {};
@@ -52,7 +52,7 @@ struct TestObject : public Persistanace::Persistable {
std::vector<std::unique_ptr<TestObject>> vptr;
bool
- persist(Persistanace::PersistanceStore & store) override
+ persist(Persistence::PersistenceStore & store) override
{
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)
@@ -60,7 +60,7 @@ struct TestObject : public Persistanace::Persistable {
}
};
-struct JPP : public Persistanace::JsonParsePersistance {
+struct JPP : public Persistence::JsonParsePersistence {
template<typename T>
T
load_json(const char * path)
@@ -68,7 +68,7 @@ struct JPP : public Persistanace::JsonParsePersistance {
BOOST_TEST_CONTEXT(path) {
std::ifstream ss {path};
auto to = loadState<T>(ss);
- Persistanace::sharedObjects.clear();
+ Persistence::sharedObjects.clear();
BOOST_CHECK(stk.empty());
BOOST_REQUIRE(to);
return to;
@@ -179,14 +179,14 @@ BOOST_FIXTURE_TEST_CASE(load_vector_ptr, JPP)
BOOST_CHECK(to->vptr.at(3)->str.empty());
}
-struct SharedTestObject : public Persistanace::Persistable {
+struct SharedTestObject : public Persistence::Persistable {
SharedTestObject() = default;
std::shared_ptr<AbsObject> sptr;
std::shared_ptr<SubObject> ssptr;
bool
- persist(Persistanace::PersistanceStore & store) override
+ persist(Persistence::PersistenceStore & store) override
{
return STORE_TYPE && STORE_MEMBER(sptr) && STORE_MEMBER(ssptr);
}