diff options
author | Elias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com> | 2020-11-04 16:57:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 16:57:47 +0100 |
commit | 3e16c3a78fff61c20e63ba730d15e94e3bb877b4 (patch) | |
tree | c070350db219f2c4241d22bc31949685c7b42fe9 /src/unittest/test_areastore.cpp | |
parent | 5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (diff) | |
parent | 6ccb5835ff55d85156be91473c598eca9d6cb9a6 (diff) | |
download | dragonfireclient-3e16c3a78fff61c20e63ba730d15e94e3bb877b4.tar.xz |
Merge branch 'master' into master
Diffstat (limited to 'src/unittest/test_areastore.cpp')
-rw-r--r-- | src/unittest/test_areastore.cpp | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/src/unittest/test_areastore.cpp b/src/unittest/test_areastore.cpp index 96a83cf25..691cd69d2 100644 --- a/src/unittest/test_areastore.cpp +++ b/src/unittest/test_areastore.cpp @@ -21,8 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/areastore.h" -class TestAreaStore : public TestBase -{ +class TestAreaStore : public TestBase { public: TestAreaStore() { TestManager::registerTestModule(this); } const char *getName() { return "TestAreaStore"; } @@ -140,22 +139,21 @@ void TestAreaStore::testSerialization() store.serialize(os); std::string str = os.str(); - std::string str_wanted( - "\x00" // Version - "\x00\x02" // Count - "\xFF\xFF\x00\x00\x00\x01" // Area A min edge - "\x00\x00\x00\x01\x00\x02" // Area A max edge - "\x00\x07" // Area A data length - "Area AA" // Area A data - "\x00\x7B\x00\x64\x00\x0A" // Area B min edge (last two swapped - // with max edge for sorting) - "\x7D\x00\x01\xC8\x03\x15" // Area B max edge (^) - "\x00\x07" // Area B data length - "Area BB" // Area B data - "\x00\x00\x00\x00" // ID A = 0 - "\x00\x00\x00\x01", // ID B = 1 - 1 + 2 + (6 + 6 + 2 + 7) * 2 + // min/max edge, length, data - 2 * 4); // Area IDs + std::string str_wanted("\x00" // Version + "\x00\x02" // Count + "\xFF\xFF\x00\x00\x00\x01" // Area A min edge + "\x00\x00\x00\x01\x00\x02" // Area A max edge + "\x00\x07" // Area A data length + "Area AA" // Area A data + "\x00\x7B\x00\x64\x00\x0A" // Area B min edge (last two swapped with max edge for sorting) + "\x7D\x00\x01\xC8\x03\x15" // Area B max edge (^) + "\x00\x07" // Area B data length + "Area BB" // Area B data + "\x00\x00\x00\x00" // ID A = 0 + "\x00\x00\x00\x01", // ID B = 1 + 1 + 2 + + (6 + 6 + 2 + 7) * 2 + // min/max edge, length, data + 2 * 4); // Area IDs UASSERTEQ(const std::string &, str, str_wanted); @@ -172,3 +170,4 @@ void TestAreaStore::testSerialization() UASSERTEQ(u32, c.id, 2); } + |