| 678 | } |
| 679 | |
| 680 | void test_std_array ( |
| 681 | ) |
| 682 | { |
| 683 | std::array<int,5> a, b; |
| 684 | |
| 685 | a = {1, 2, 3, 4, 5}; |
| 686 | |
| 687 | ostringstream sout; |
| 688 | dlib::serialize(a, sout); |
| 689 | istringstream sin(sout.str()); |
| 690 | |
| 691 | dlib::deserialize(b, sin); |
| 692 | |
| 693 | |
| 694 | DLIB_TEST(a.size() == b.size()); |
| 695 | DLIB_TEST(a.size() == 5); |
| 696 | for (unsigned long i = 0; i < a.size(); ++i) |
| 697 | { |
| 698 | DLIB_TEST(a[i] == b[i]); |
| 699 | } |
| 700 | |
| 701 | std::array<int,0> aa, bb; |
| 702 | sout.str(""); |
| 703 | dlib::serialize(aa, sout); |
| 704 | sin.str(sout.str()); |
| 705 | dlib::deserialize(bb, sin); |
| 706 | DLIB_TEST(bb.size() == 0); |
| 707 | } |
| 708 | |
| 709 | void test_vector_bool ( |
| 710 | ) |
no test coverage detected