This commit is contained in:
Aria 2025-03-21 22:23:30 +11:00
commit 9c94d113d3
Signed by untrusted user who does not match committer: aria
GPG key ID: 19AB7AA462B8AB3B
10260 changed files with 1237388 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#include "StarDataStreamDevices.hpp"
#include "gtest/gtest.h"
using namespace Star;
template <typename T>
void testMap(T const& map) {
auto byteArray = DataStreamBuffer::serializeMapContainer(map);
auto mapOut = DataStreamBuffer::deserializeMapContainer<T>(byteArray);
EXPECT_EQ(map, mapOut);
}
TEST(DataStreamTest, All) {
Map<int, int> map1 = {
{1, 2}, {3, 4}, {5, 6},
};
Map<String, int> map2 = {
{"asdf", 1}, {"asdf1", 2}, {"omg", 2},
};
Map<String, int> map3 = {};
testMap(map1);
testMap(map2);
testMap(map3);
}