| 707 | } |
| 708 | |
| 709 | void test_vector_bool ( |
| 710 | ) |
| 711 | { |
| 712 | std::vector<bool> a, b; |
| 713 | |
| 714 | a.push_back(true); |
| 715 | a.push_back(true); |
| 716 | a.push_back(false); |
| 717 | a.push_back(true); |
| 718 | a.push_back(false); |
| 719 | a.push_back(true); |
| 720 | |
| 721 | ostringstream sout; |
| 722 | dlib::serialize(a, sout); |
| 723 | istringstream sin(sout.str()); |
| 724 | |
| 725 | dlib::deserialize(b, sin); |
| 726 | |
| 727 | |
| 728 | DLIB_TEST(a.size() == b.size()); |
| 729 | DLIB_TEST(a.size() == 6); |
| 730 | for (unsigned long i = 0; i < a.size(); ++i) |
| 731 | { |
| 732 | DLIB_TEST(a[i] == b[i]); |
| 733 | } |
| 734 | } |
| 735 | |
| 736 | // ---------------------------------------------------------------------------------------- |
| 737 |
no test coverage detected