| 177 | } // namespace |
| 178 | |
| 179 | UNIT_TEST(SerdesJsonTest) |
| 180 | { |
| 181 | { |
| 182 | ValueTypes valueTypes(0); |
| 183 | TEST(TestSerDes(valueTypes), ()); |
| 184 | |
| 185 | ObjectTypes objectTypes(0); |
| 186 | TEST(TestSerDes(objectTypes), ()); |
| 187 | |
| 188 | PointerTypes pointersTypes(0); |
| 189 | TEST(TestSerDes(pointersTypes), ()); |
| 190 | |
| 191 | ArrayTypes arrayTypes(0); |
| 192 | TEST(TestSerDes(arrayTypes), ()); |
| 193 | } |
| 194 | |
| 195 | { |
| 196 | pair<string, m2::PointD> testValue = {"test", m2::PointD(1.0, 2.0)}; |
| 197 | TEST(TestSerDes(testValue), ()); |
| 198 | } |
| 199 | |
| 200 | { |
| 201 | pair<m2::PointD, m2::PointD> testValue = {m2::PointD(1.0, 2.0), m2::PointD(2.0, 3.0)}; |
| 202 | TEST(TestSerDes(testValue), ()); |
| 203 | } |
| 204 | |
| 205 | { |
| 206 | pair<string, pair<string, string>> testValue = {"test", {"test1", "test2"}}; |
| 207 | TEST(TestSerDes(testValue), ()); |
| 208 | } |
| 209 | |
| 210 | { |
| 211 | pair<string, ValueTypes> testValue = {"test", ValueTypes(0)}; |
| 212 | TEST(TestSerDes(testValue), ()); |
| 213 | } |
| 214 | |
| 215 | { |
| 216 | array<ObjectTypes, 2> testValue = {{ObjectTypes(0), ObjectTypes(1)}}; |
| 217 | TEST(TestSerDes(testValue), ()); |
| 218 | } |
| 219 | |
| 220 | { |
| 221 | struct Hasher |
| 222 | { |
| 223 | size_t operator()(pair<string, string> const & item) const { return m_hasher(item.first + item.second); } |
| 224 | |
| 225 | hash<string> m_hasher; |
| 226 | }; |
| 227 | |
| 228 | ankerl::unordered_dense::set<pair<string, string>, Hasher> testValue = {{"ab", "ab"}, {"ef", "ef"}, {"cd", "cd"}}; |
| 229 | TEST(TestSerDes(testValue), ()); |
| 230 | } |
| 231 | |
| 232 | { |
| 233 | vector<vector<uint32_t>> testValue; |
| 234 | for (uint32_t i = 0; i < 5; ++i) |
| 235 | testValue.push_back({i, i, i}); |
| 236 | TEST(TestSerDes(testValue), ()); |
nothing calls this directly
no test coverage detected