MCPcopy Create free account
hub / github.com/davisking/dlib / test_vector_bool

Function test_vector_bool

dlib/test/serialize.cpp:709–734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

perform_testMethod · 0.85

Calls 5

serializeFunction · 0.70
deserializeFunction · 0.70
push_backMethod · 0.45
strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected