This commit is contained in:
Vinnie Falco
2019-09-16 08:31:09 -07:00
parent c0ffc9f665
commit 75db467323
4 changed files with 1062 additions and 273 deletions

View File

@ -15,6 +15,7 @@
namespace boost {
namespace fixed_string {
static
void
testConstruct()
{
@ -117,9 +118,93 @@ testConstruct()
}
}
static
void
testAssign()
testAssignment()
{
// assign(size_type count, CharT ch)
BOOST_TEST(fixed_string<3>{}.assign(1, '*') == "*");
BOOST_TEST(fixed_string<3>{}.assign(3, '*') == "***");
BOOST_TEST(fixed_string<3>{"abc"}.assign(3, '*') == "***");
BOOST_TEST_THROWS(fixed_string<1>{"a"}.assign(2, '*'), std::length_error);
// assign(fixed_string const& s) noexcept
BOOST_TEST(fixed_string<3>{}.assign(fixed_string<3>{"abc"}) == "abc");
BOOST_TEST(fixed_string<3>{"*"}.assign(fixed_string<3>{"abc"}) == "abc");
BOOST_TEST(fixed_string<3>{"***"}.assign(fixed_string<3>{"abc"}) == "abc");
// assign(fixed_string<M, CharT, Traits> const& s)
BOOST_TEST(fixed_string<3>{}.assign(fixed_string<5>{"abc"}) == "abc");
BOOST_TEST(fixed_string<3>{"*"}.assign(fixed_string<5>{"abc"}) == "abc");
BOOST_TEST(fixed_string<3>{"***"}.assign(fixed_string<5>{"abc"}) == "abc");
BOOST_TEST_THROWS(fixed_string<3>{}.assign(fixed_string<5>{"abcde"}), std::length_error);
// assign(fixed_string<M, CharT, Traits> const& s, size_type pos, size_type count = npos)
BOOST_TEST(fixed_string<4>{}.assign(fixed_string<5>{"abcde"}, 1) == "bcde");
BOOST_TEST(fixed_string<3>{}.assign(fixed_string<5>{"abcde"}, 1, 3) == "bcd");
BOOST_TEST(fixed_string<3>{"*"}.assign(fixed_string<5>{"abcde"}, 1, 3) == "bcd");
BOOST_TEST(fixed_string<3>{"***"}.assign(fixed_string<5>{"abcde"}, 1, 3) == "bcd");
BOOST_TEST_THROWS(fixed_string<3>{}.assign(fixed_string<5>{"abcde"}, 0), std::length_error);
// assign(CharT const* s, size_type count)
BOOST_TEST(fixed_string<3>{}.assign("abc", 3) == "abc");
BOOST_TEST(fixed_string<3>{"*"}.assign("abc", 3) == "abc");
BOOST_TEST_THROWS(fixed_string<1>{}.assign("abc", 3), std::length_error);
// assign(CharT const* s)
BOOST_TEST(fixed_string<3>{}.assign("abc") == "abc");
BOOST_TEST(fixed_string<3>{"*"}.assign("abc") == "abc");
BOOST_TEST_THROWS(fixed_string<1>{}.assign("abc"), std::length_error);
// assign(InputIt first, InputIt last)
{
fixed_string<4> const cs{"abcd"};
fixed_string<4> s{"ad"};
BOOST_TEST(fixed_string<4>{}.assign(cs.begin(), cs.end()) == "abcd");
BOOST_TEST(fixed_string<4>{"*"}.assign(cs.begin(), cs.end()) == "abcd");
BOOST_TEST_THROWS(fixed_string<2>{"*"}.assign(cs.begin(), cs.end()), std::length_error);
}
// assign(std::initializer_list<CharT> ilist)
BOOST_TEST(fixed_string<3>{}.assign({'a', 'b', 'c'}) == "abc");
BOOST_TEST(fixed_string<3>{"*"}.assign({'a', 'b', 'c'}) == "abc");
BOOST_TEST(fixed_string<3>{"***"}.assign({'a', 'b', 'c'}) == "abc");
BOOST_TEST_THROWS(fixed_string<1>{}.assign({'a', 'b', 'c'}), std::length_error);
// assign(T const& t)
{
struct T
{
operator string_view() const noexcept
{
return "abc";
}
};
BOOST_TEST(fixed_string<3>{}.assign(T{}) == "abc");
BOOST_TEST(fixed_string<3>{"*"}.assign(T{}) == "abc");
BOOST_TEST(fixed_string<3>{"***"}.assign(T{}) == "abc");
BOOST_TEST_THROWS(fixed_string<2>{"**"}.assign(T{}), std::length_error);
}
// assign(T const& t, size_type pos, size_type count = npos)
{
struct T
{
operator string_view() const noexcept
{
return "abcde";
}
};
BOOST_TEST(fixed_string<5>{}.assign(T{}, 0) == "abcde");
BOOST_TEST(fixed_string<5>{}.assign(T{}, 0, 5) == "abcde");
BOOST_TEST(fixed_string<5>{}.assign(T{}, 1, 3) == "bcd");
BOOST_TEST(fixed_string<5>{"*"}.assign(T{}, 1) == "bcde");
BOOST_TEST_THROWS(fixed_string<2>{"**"}.assign(T{}, 6, 3), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<2>{"**"}.assign(T{}, 1, 3), std::length_error);
}
//---
{
fixed_string<3> s1("123");
fixed_string<3> s2;
@ -291,9 +376,59 @@ testAssign()
}
}
static
void
testAccess()
testElements()
{
using cfs3 = fixed_string<3> const;
// at(size_type pos)
BOOST_TEST(fixed_string<3>{"abc"}.at(0) == 'a');
BOOST_TEST(fixed_string<3>{"abc"}.at(2) == 'c');
BOOST_TEST_THROWS(fixed_string<3>{""}.at(0), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.at(4), std::out_of_range);
// at(size_type pos) const
BOOST_TEST(cfs3{"abc"}.at(0) == 'a');
BOOST_TEST(cfs3{"abc"}.at(2) == 'c');
BOOST_TEST_THROWS(cfs3{""}.at(0), std::out_of_range);
BOOST_TEST_THROWS(cfs3{"abc"}.at(4), std::out_of_range);
// operator[](size_type pos)
BOOST_TEST(fixed_string<3>{"abc"}[0] == 'a');
BOOST_TEST(fixed_string<3>{"abc"}[2] == 'c');
BOOST_TEST(fixed_string<3>{"abc"}[3] == 0);
BOOST_TEST(fixed_string<3>{""}[0] == 0);
// operator[](size_type pos) const
BOOST_TEST(cfs3{"abc"}[0] == 'a');
BOOST_TEST(cfs3{"abc"}[2] == 'c');
BOOST_TEST(cfs3{"abc"}[3] == 0);
BOOST_TEST(cfs3{""}[0] == 0);
// front()
BOOST_TEST(fixed_string<3>{"a"}.front() == 'a');
BOOST_TEST(fixed_string<3>{"abc"}.front() == 'a');
// front() const
BOOST_TEST(cfs3{"a"}.front() == 'a');
BOOST_TEST(cfs3{"abc"}.front() == 'a');
// back()
BOOST_TEST(fixed_string<3>{"a"}.back() == 'a');
BOOST_TEST(fixed_string<3>{"abc"}.back() == 'c');
// back() const
BOOST_TEST(cfs3{"a"}.back() == 'a');
BOOST_TEST(cfs3{"abc"}.back() == 'c');
// data() noexcept
// data() const noexcept
// c_str() const noexcept
// operator string_view_type() const noexcept
//---
{
fixed_string<5> s("12345");
BOOST_TEST(s.at(1) == '2');
@ -359,37 +494,74 @@ testAccess()
}
}
static
void
testIterators()
{
{
fixed_string<3> s;
BOOST_TEST(std::distance(
s.begin(), s.end()) == 0);
BOOST_TEST(std::distance(
s.rbegin(), s.rend()) == 0);
BOOST_TEST(std::distance(s.begin(), s.end()) == 0);
BOOST_TEST(std::distance(s.rbegin(), s.rend()) == 0);
s = "123";
BOOST_TEST(std::distance(
s.begin(), s.end()) == 3);
BOOST_TEST(std::distance(
s.rbegin(), s.rend()) == 3);
BOOST_TEST(std::distance(s.begin(), s.end()) == 3);
BOOST_TEST(std::distance(s.rbegin(), s.rend()) == 3);
}
{
fixed_string<3> const s("123");
BOOST_TEST(std::distance(
s.begin(), s.end()) == 3);
BOOST_TEST(std::distance(
s.cbegin(), s.cend()) == 3);
BOOST_TEST(std::distance(
s.rbegin(), s.rend()) == 3);
BOOST_TEST(std::distance(
s.crbegin(), s.crend()) == 3);
BOOST_TEST(std::distance(s.begin(), s.end()) == 3);
BOOST_TEST(std::distance(s.cbegin(), s.cend()) == 3);
BOOST_TEST(std::distance(s.rbegin(), s.rend()) == 3);
BOOST_TEST(std::distance(s.crbegin(), s.crend()) == 3);
}
}
static
void
testCapacity()
{
// empty()
BOOST_TEST(fixed_string<0>{}.empty());
BOOST_TEST(fixed_string<1>{}.empty());
BOOST_TEST(! fixed_string<1>{"a"}.empty());
BOOST_TEST(! fixed_string<3>{"abc"}.empty());
// size()
BOOST_TEST(fixed_string<0>{}.size() == 0);
BOOST_TEST(fixed_string<1>{}.size() == 0);
BOOST_TEST(fixed_string<1>{"a"}.size() == 1);
BOOST_TEST(fixed_string<3>{"abc"}.size() == 3);
BOOST_TEST(fixed_string<5>{"abc"}.size() == 3);
// length()
BOOST_TEST(fixed_string<0>{}.length() == 0);
BOOST_TEST(fixed_string<1>{}.length() == 0);
BOOST_TEST(fixed_string<1>{"a"}.length() == 1);
BOOST_TEST(fixed_string<3>{"abc"}.length() == 3);
BOOST_TEST(fixed_string<5>{"abc"}.length() == 3);
// max_size()
BOOST_TEST(fixed_string<0>{}.max_size() == 0);
BOOST_TEST(fixed_string<1>{}.max_size() == 1);
BOOST_TEST(fixed_string<1>{"a"}.max_size() == 1);
BOOST_TEST(fixed_string<3>{"abc"}.max_size() == 3);
BOOST_TEST(fixed_string<5>{"abc"}.max_size() == 5);
// reserve(std::size_t n)
fixed_string<3>{}.reserve(0);
fixed_string<3>{}.reserve(1);
fixed_string<3>{}.reserve(3);
BOOST_TEST_THROWS(fixed_string<0>{}.reserve(1), std::length_error);
BOOST_TEST_THROWS(fixed_string<3>{}.reserve(4), std::length_error);
// capacity()
BOOST_TEST(fixed_string<0>{}.capacity() == 0);
BOOST_TEST(fixed_string<1>{}.capacity() == 1);
BOOST_TEST(fixed_string<1>{"a"}.capacity() == 1);
BOOST_TEST(fixed_string<3>{"abc"}.capacity() == 3);
BOOST_TEST(fixed_string<5>{"abc"}.capacity() == 5);
//---
fixed_string<3> s;
BOOST_TEST(s.empty());
BOOST_TEST(s.size() == 0);
@ -412,23 +584,117 @@ testCapacity()
BOOST_TEST(*s.end() == 0);
}
static
void
testOperations()
testClear()
{
//
// clear
//
// clear()
fixed_string<3> s("123");
s.clear();
BOOST_TEST(s.empty());
BOOST_TEST(*s.end() == 0);
}
static
void
testInsert()
{
using sv = string_view;
// insert(size_type index, size_type count, CharT ch)
// The overload resolution is ambiguous
// here because 0 is also a pointer type
//BOOST_TEST(fixed_string<3>{"bc"}.insert(0, 1, 'a') == "abc");
BOOST_TEST(fixed_string<3>{"bc"}.insert(std::size_t(0), 1, 'a') == "abc");
BOOST_TEST(fixed_string<3>{"ac"}.insert(1, 1, 'b') == "abc");
BOOST_TEST(fixed_string<3>{"ab"}.insert(2, 1, 'c') == "abc");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.insert(4, 1, '*'), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.insert(1, 1, '*'), std::length_error);
// insert(size_type index, CharT const* s)
BOOST_TEST(fixed_string<3>{"bc"}.insert(0, "a") == "abc");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.insert(4, "*"), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.insert(1, "*"), std::length_error);
// insert(size_type index, CharT const* s, size_type count)
BOOST_TEST(fixed_string<4>{"ad"}.insert(1, "bcd", 2) == "abcd");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.insert(4, "*"), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.insert(1, "*"), std::length_error);
// insert(size_type index, string_view_type sv)
BOOST_TEST(fixed_string<3>{"ac"}.insert(1, sv{"b"}) == "abc");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.insert(4, sv{"*"}), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.insert(1, sv{"*"}), std::length_error);
// insert(size_type index, string_view_type sv, size_type index_str, size_type count = npos)
BOOST_TEST(fixed_string<4>{"ad"}.insert(1, sv{"abcd"}, 1, 2) == "abcd");
BOOST_TEST(fixed_string<4>{"ad"}.insert(1, sv{"abc"}, 1) == "abcd");
BOOST_TEST_THROWS((fixed_string<4>{"ad"}.insert(1, sv{"bc"}, 3, 0)), std::out_of_range);
BOOST_TEST_THROWS((fixed_string<3>{"ad"}.insert(1, sv{"bc"}, 0, 2)), std::length_error);
// insert(const_iterator pos, CharT ch)
{
fixed_string<3> s("123");
s.clear();
BOOST_TEST(s.empty());
BOOST_TEST(*s.end() == 0);
fixed_string<3> s{"ac"};
BOOST_TEST(s.insert(s.begin() + 1, 'b') == s.begin() + 1);
BOOST_TEST(s == "abc");
BOOST_TEST_THROWS(s.insert(s.begin() + 1, '*'), std::length_error);
}
//
// insert
//
// insert(const_iterator pos, size_type count, CharT ch)
{
fixed_string<4> s{"ac"};
BOOST_TEST(s.insert(s.begin() + 1, 2, 'b') == s.begin() + 1);
BOOST_TEST(s == "abbc");
BOOST_TEST_THROWS(s.insert(s.begin() + 1, 2, '*'), std::length_error);
}
// insert(const_iterator pos, InputIt first, InputIt last)
{
fixed_string<4> const cs{"abcd"};
fixed_string<4> s{"ad"};
BOOST_TEST(s.insert(s.begin() + 1, cs.begin() + 1, cs.begin() + 3) == s.begin() + 1);
BOOST_TEST(s == "abcd");
}
// insert(const_iterator pos, std::initializer_list<CharT> ilist)
{
fixed_string<4> s{"ad"};
BOOST_TEST(s.insert(s.begin() + 1, {'b', 'c'}) == s.begin() + 1);
BOOST_TEST(s == "abcd");
}
// insert(size_type index, T const& t)
{
struct T
{
operator string_view() const noexcept
{
return "b";
}
};
BOOST_TEST(fixed_string<3>{"ac"}.insert(1, T{}) == "abc");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.insert(4, T{}), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.insert(1, T{}), std::length_error);
}
// insert(size_type index, T const& t, size_type index_str, size_type count = npos)
{
struct T
{
operator string_view() const noexcept
{
return "abcd";
}
};
BOOST_TEST(fixed_string<6>{"ae"}.insert(1, T{}, 1) == "abcde");
BOOST_TEST(fixed_string<6>{"abe"}.insert(2, T{}, 2) == "abcde");
BOOST_TEST(fixed_string<4>{"ac"}.insert(1, T{}, 1, 1) == "abc");
BOOST_TEST(fixed_string<4>{"ad"}.insert(1, T{}, 1, 2) == "abcd");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.insert(4, T{}), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.insert(1, T{}), std::length_error);
}
//---
{
// Using 7 as the size causes a miscompile in MSVC14.2 x64 Release
@ -571,10 +837,42 @@ testOperations()
(s1.insert(4, std::string("PQR"), 1, 1)),
std::length_error);
}
}
//
// erase
//
static
void
testErase()
{
// erase(size_type index = 0, size_type count = npos)
BOOST_TEST(fixed_string<3>{"abc"}.erase() == "");
BOOST_TEST(fixed_string<3>{"abc"}.erase(1) == "a");
BOOST_TEST(fixed_string<3>{"abc"}.erase(2) == "ab");
BOOST_TEST(fixed_string<3>{"abc"}.erase(1, 1) == "ac");
BOOST_TEST(fixed_string<3>{"abc"}.erase(0, 2) == "c");
BOOST_TEST(fixed_string<3>{"abc"}.erase(3, 0) == "abc");
BOOST_TEST(fixed_string<3>{"abc"}.erase(3, 4) == "abc");
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.erase(4, 0), std::out_of_range);
// erase(const_iterator pos)
{
fixed_string<3> s{"abc"};
BOOST_TEST(s.erase(s.begin() + 1) == s.begin() + 1);
BOOST_TEST(s == "ac");
}
{
fixed_string<3> s{"abc"};
BOOST_TEST(s.erase(s.begin() + 3) == s.end());
BOOST_TEST(s == "abc");
}
// erase(const_iterator first, const_iterator last)
{
fixed_string<4> s{"abcd"};
BOOST_TEST(s.erase(s.begin() + 1, s.begin() + 3) == s.begin() + 1);
BOOST_TEST(s == "ad");
}
//---
{
fixed_string<9> s1("123456789");
@ -601,10 +899,23 @@ testOperations()
BOOST_TEST(s1 == "1234589");
BOOST_TEST(*s1.end() == 0);
}
}
//
// push_back
//
static
void
testPushBack()
{
// push_back(CharT ch);
{
fixed_string<2> s;
s.push_back('a');
BOOST_TEST(s == "a");
s.push_back('b');
BOOST_TEST(s == "ab");
BOOST_TEST_THROWS(s.push_back('c'), std::length_error);
}
//---
{
fixed_string<3> s1("12");
@ -618,10 +929,28 @@ testOperations()
s2.push_back('_'),
std::length_error);
}
}
//
// pop_back
//
static
void
testPopBack()
{
// pop_back()
{
fixed_string<3> s{"abc"};
BOOST_TEST(*s.end() == 0);
s.pop_back();
BOOST_TEST(s == "ab");
BOOST_TEST(*s.end() == 0);
s.pop_back();
BOOST_TEST(s == "a");
BOOST_TEST(*s.end() == 0);
s.pop_back();
BOOST_TEST(s.empty());
BOOST_TEST(*s.end() == 0);
}
//---
{
fixed_string<3> s1("123");
@ -635,10 +964,83 @@ testOperations()
BOOST_TEST(s1.empty());
BOOST_TEST(*s1.end() == 0);
}
}
//
// append
//
static
void
testAppend()
{
using sv = string_view;
// append(size_type count, CharT ch)
BOOST_TEST(fixed_string<1>{}.append(1, 'a') == "a");
BOOST_TEST(fixed_string<2>{}.append(2, 'a') == "aa");
BOOST_TEST(fixed_string<2>{"a"}.append(1, 'b') == "ab");
BOOST_TEST_THROWS(fixed_string<2>{"ab"}.append(1, 'c'), std::length_error);
// append(string_view_type sv)
BOOST_TEST(fixed_string<3>{"a"}.append(sv{"bc"}) == "abc");
BOOST_TEST(fixed_string<3>{"ab"}.append(sv{"c"}) == "abc");
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append(sv{"*"}), std::length_error);
// append(string_view_type sv, size_type pos, size_type count = npos)
BOOST_TEST(fixed_string<3>{"a"}.append(sv{"abc"}, 1) == "abc");
BOOST_TEST(fixed_string<3>{"a"}.append(sv{"abc"}, 1, 2) == "abc");
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append(sv{"a"}, 2, 1), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append(sv{"abcd"}, 1, 2), std::length_error);
// append(CharT const* s, size_type count)
BOOST_TEST(fixed_string<3>{"a"}.append("bc", 0) == "a");
BOOST_TEST(fixed_string<3>{"a"}.append("bc", 2) == "abc");
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append("bc", 2), std::length_error);
// append(CharT const* s)
BOOST_TEST(fixed_string<3>{"a"}.append("bc") == "abc");
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append("bc"), std::length_error);
// append(InputIt first, InputIt last)
{
fixed_string<4> const cs{"abcd"};
fixed_string<4> s{"ad"};
BOOST_TEST(fixed_string<4>{"ab"}.append(
cs.begin() + 2, cs.begin() + 4) == "abcd");
BOOST_TEST_THROWS(fixed_string<2>{"ab"}.append(
cs.begin() + 2, cs.begin() + 4), std::length_error);
}
// append(std::initializer_list<CharT> ilist)
BOOST_TEST(fixed_string<4>{"ab"}.append({'c', 'd'}) == "abcd");
BOOST_TEST_THROWS(fixed_string<3>{"ab"}.append({'c', 'd'}), std::length_error);
// append(T const& t)
{
struct T
{
operator string_view() const noexcept
{
return "c";
}
};
BOOST_TEST(fixed_string<3>{"ab"}.append(T{}) == "abc");
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append(T{}), std::length_error);
}
// append(T const& t, size_type pos, size_type count = npos)
{
struct T
{
operator string_view() const noexcept
{
return "abcd";
}
};
BOOST_TEST(fixed_string<4>{"ab"}.append(T{}, 2) == "abcd");
BOOST_TEST(fixed_string<3>{"a"}.append(T{}, 1, 2) == "abc");
BOOST_TEST_THROWS(fixed_string<4>{"abc"}.append(T{}, 5), std::out_of_range);
BOOST_TEST_THROWS(fixed_string<3>{"abc"}.append(T{}, 3, 1), std::length_error);
}
//---
{
fixed_string<3> s1("1");
@ -673,7 +1075,7 @@ testOperations()
BOOST_TEST(*s3.end() == 0);
fixed_string<3> s4("12");
BOOST_TEST_THROWS(
(s4.append(s1, 3)),
(s4.append(s1, 4)),
std::out_of_range);
fixed_string<3> s5("12");
BOOST_TEST_THROWS(
@ -745,10 +1147,31 @@ testOperations()
(s2.append(std::string("PQR"), 1, 1)),
std::length_error);
}
}
//
// operator+=
//
static
void
testPlusEquals()
{
using sv = string_view;
// operator+=(CharT ch)
BOOST_TEST((fixed_string<3>{"ab"} += 'c') == "abc");
BOOST_TEST_THROWS((fixed_string<3>{"abc"} += '*'), std::length_error);
// operator+=(CharT const* s)
BOOST_TEST((fixed_string<3>{"a"} += "bc") == "abc");
BOOST_TEST_THROWS((fixed_string<3>{"abc"} += "*"), std::length_error);
// operator+=(std::initializer_list<CharT> init)
BOOST_TEST((fixed_string<3>{"a"} += {'b', 'c'}) == "abc");
BOOST_TEST_THROWS((fixed_string<3>{"abc"} += {'*', '*'}), std::length_error);
// operator+=(string_view_type const& s)
BOOST_TEST((fixed_string<3>{"a"} += sv{"bc"}) == "abc");
BOOST_TEST_THROWS((fixed_string<3>{"abc"} += sv{"*"}), std::length_error);
//---
{
fixed_string<2> s1("__");
@ -1075,11 +1498,23 @@ int
runTests()
{
testConstruct();
testAssign();
testAccess();
testAssignment();
testElements();
testIterators();
testCapacity();
testOperations();
testClear();
testInsert();
testErase();
testPushBack();
testPopBack();
testAppend();
testPlusEquals();
testCompare();
testSwap();
testGeneral();