| 576 | } |
| 577 | |
| 578 | void TestTuple() { |
| 579 | TBufferStream s; |
| 580 | |
| 581 | using TTuple = std::tuple<int, TString, unsigned int>; |
| 582 | const TTuple toSave{-10, "qwerty", 15}; |
| 583 | Save(&s, toSave); |
| 584 | |
| 585 | TTuple toLoad; |
| 586 | Load(&s, toLoad); |
| 587 | |
| 588 | UNIT_ASSERT_VALUES_EQUAL(std::get<0>(toLoad), std::get<0>(toSave)); |
| 589 | UNIT_ASSERT_VALUES_EQUAL(std::get<1>(toLoad), std::get<1>(toSave)); |
| 590 | UNIT_ASSERT_VALUES_EQUAL(std::get<2>(toLoad), std::get<2>(toSave)); |
| 591 | } |
| 592 | |
| 593 | template <class TVariant, class T> |
| 594 | void TestVariantImpl(TVariant& v, const T& expected) { |