[libcxx] [test] Untabify, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stephan T. Lavavej
2017-07-29 00:55:10 +00:00
parent 62e519c2f9
commit a686caad20
121 changed files with 786 additions and 786 deletions

View File

@@ -32,11 +32,11 @@ template <class S, class It>
void
test_exceptions(S s, It first, It last)
{
S aCopy = s;
S aCopy = s;
try {
s.append(first, last);
assert(false);
}
s.append(first, last);
assert(false);
}
catch (...) {}
LIBCPP_ASSERT(s.__invariants());
assert(s == aCopy);
@@ -164,7 +164,7 @@ int main()
}
#endif
#ifndef TEST_HAS_NO_EXCEPTIONS
{ // test iterator operations that throw
{ // test iterator operations that throw
typedef std::string S;
typedef ThrowingIterator<char> TIter;
typedef input_iterator<TIter> IIter;
@@ -176,33 +176,33 @@ int main()
test_exceptions(S(), TIter(s, s+10, 4, TIter::TAIncrement), TIter());
test_exceptions(S(), TIter(s, s+10, 5, TIter::TADereference), TIter());
test_exceptions(S(), TIter(s, s+10, 6, TIter::TAComparison), TIter());
}
}
#endif
{ // test appending to self
{ // test appending to self
typedef std::string S;
S s_short = "123/";
S s_long = "Lorem ipsum dolor sit amet, consectetur/";
S s_short = "123/";
S s_long = "Lorem ipsum dolor sit amet, consectetur/";
s_short.append(s_short.begin(), s_short.end());
assert(s_short == "123/123/");
s_short.append(s_short.begin(), s_short.end());
assert(s_short == "123/123/123/123/");
s_short.append(s_short.begin(), s_short.end());
assert(s_short == "123/123/123/123/123/123/123/123/");
s_short.append(s_short.begin(), s_short.end());
assert(s_short == "123/123/");
s_short.append(s_short.begin(), s_short.end());
assert(s_short == "123/123/123/123/");
s_short.append(s_short.begin(), s_short.end());
assert(s_short == "123/123/123/123/123/123/123/123/");
s_long.append(s_long.begin(), s_long.end());
assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/");
}
s_long.append(s_long.begin(), s_long.end());
assert(s_long == "Lorem ipsum dolor sit amet, consectetur/Lorem ipsum dolor sit amet, consectetur/");
}
{ // test appending a different type
{ // test appending a different type
typedef std::string S;
const uint8_t p[] = "ABCD";
const uint8_t p[] = "ABCD";
S s;
s.append(p, p + 4);
assert(s == "ABCD");
}
S s;
s.append(p, p + 4);
assert(s == "ABCD");
}
{ // test with a move iterator that returns char&&
typedef forward_iterator<const char*> It;