Fixing whitespace problems
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@111764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bbd8086ee3
commit
6e0a1f458e
@ -43,6 +43,6 @@ int main()
|
|||||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
test<std::u16string>();
|
test<std::u16string>();
|
||||||
test<std::u32string>();
|
test<std::u32string>();
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
test<std::wstring>();
|
test<std::wstring>();
|
||||||
}
|
}
|
||||||
|
@ -29,4 +29,4 @@ public:
|
|||||||
{return !(x == y);}
|
{return !(x == y);}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // INPUT_ITERATOR_H
|
||||||
|
@ -28,5 +28,5 @@ int main()
|
|||||||
s = {L'a', L'b', L'c'};
|
s = {L'a', L'b', L'c'};
|
||||||
assert(s == L"abc");
|
assert(s == L"abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
s = {'a', 'b', 'c'};
|
s = {'a', 'b', 'c'};
|
||||||
assert(s == "abc");
|
assert(s == "abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ test(S s0)
|
|||||||
assert(s2.get_allocator() == s1.get_allocator());
|
assert(s2.get_allocator() == s1.get_allocator());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@ -41,5 +41,5 @@ int main()
|
|||||||
test(S(A(3)));
|
test(S(A(3)));
|
||||||
test(S("1", A(5)));
|
test(S("1", A(5)));
|
||||||
test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A(7)));
|
test(S("1234567890123456789012345678901234567890123456789012345678901234567890", A(7)));
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ test(S s0, const typename S::allocator_type& a)
|
|||||||
assert(s2.get_allocator() == a);
|
assert(s2.get_allocator() == a);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@ -41,5 +41,5 @@ int main()
|
|||||||
test(S(), A(3));
|
test(S(), A(3));
|
||||||
test(S("1"), A(5));
|
test(S("1"), A(5));
|
||||||
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A(7));
|
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"), A(7));
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ test(S s1, S s2)
|
|||||||
assert(s1.capacity() >= s1.size());
|
assert(s1.capacity() >= s1.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@ -52,5 +52,5 @@ int main()
|
|||||||
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"
|
test(S("1234567890123456789012345678901234567890123456789012345678901234567890"
|
||||||
"1234567890123456789012345678901234567890123456789012345678901234567890"),
|
"1234567890123456789012345678901234567890123456789012345678901234567890"),
|
||||||
S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
|
S("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
s.append({'a', 'b', 'c'});
|
s.append({'a', 'b', 'c'});
|
||||||
assert(s == "123abc");
|
assert(s == "123abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
s.assign({'a', 'b', 'c'});
|
s.assign({'a', 'b', 'c'});
|
||||||
assert(s == "abc");
|
assert(s == "abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -23,5 +23,5 @@ int main()
|
|||||||
assert(i - s.begin() == 3);
|
assert(i - s.begin() == 3);
|
||||||
assert(s == "123abc456");
|
assert(s == "123abc456");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
s += {'a', 'b', 'c'};
|
s += {'a', 'b', 'c'};
|
||||||
assert(s == "123abc");
|
assert(s == "123abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
s.replace(s.begin() + 3, s.begin() + 6, {'a', 'b', 'c'});
|
s.replace(s.begin() + 3, s.begin() + 6, {'a', 'b', 'c'});
|
||||||
assert(s == "123abc456");
|
assert(s == "123abc456");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,5 @@ int main()
|
|||||||
getline(std::wistringstream(L" abc* def* ghij"), s, L'*');
|
getline(std::wistringstream(L" abc* def* ghij"), s, L'*');
|
||||||
assert(s == L" abc");
|
assert(s == L" abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -31,5 +31,5 @@ int main()
|
|||||||
getline(std::wistringstream(L" abc\n def\n ghij"), s);
|
getline(std::wistringstream(L" abc\n def\n ghij"), s);
|
||||||
assert(s == L" abc");
|
assert(s == L" abc");
|
||||||
}
|
}
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ test1(typename S::value_type lhs, S&& rhs, const S& x)
|
|||||||
assert(lhs + move(rhs) == x);
|
assert(lhs + move(rhs) == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
typedef std::string S;
|
typedef std::string S;
|
||||||
|
|
||||||
@ -54,5 +54,5 @@ int main()
|
|||||||
test1('a', S("1234567890"), S("a1234567890"));
|
test1('a', S("1234567890"), S("a1234567890"));
|
||||||
test1('a', S("12345678901234567890"), S("a12345678901234567890"));
|
test1('a', S("12345678901234567890"), S("a12345678901234567890"));
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ test1(const typename S::value_type* lhs, S&& rhs, const S& x)
|
|||||||
assert(lhs + move(rhs) == x);
|
assert(lhs + move(rhs) == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
typedef std::string S;
|
typedef std::string S;
|
||||||
|
|
||||||
@ -78,5 +78,5 @@ int main()
|
|||||||
test1("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890"));
|
test1("abcdefghijklmnopqrst", S("1234567890"), S("abcdefghijklmnopqrst1234567890"));
|
||||||
test1("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890"));
|
test1("abcdefghijklmnopqrst", S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890"));
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ test1(S&& lhs, typename S::value_type rhs, const S& x)
|
|||||||
assert(move(lhs) + rhs == x);
|
assert(move(lhs) + rhs == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
typedef std::string S;
|
typedef std::string S;
|
||||||
|
|
||||||
@ -54,5 +54,5 @@ int main()
|
|||||||
test1(S("abcdefghij"), '1', S("abcdefghij1"));
|
test1(S("abcdefghij"), '1', S("abcdefghij1"));
|
||||||
test1(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1"));
|
test1(S("abcdefghijklmnopqrst"), '1', S("abcdefghijklmnopqrst1"));
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,7 @@ test1(S&& lhs, const typename S::value_type* rhs, const S& x)
|
|||||||
assert(move(lhs) + rhs == x);
|
assert(move(lhs) + rhs == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
typedef std::string S;
|
typedef std::string S;
|
||||||
|
|
||||||
@ -78,5 +78,5 @@ int main()
|
|||||||
test1(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890"));
|
test1(S("abcdefghijklmnopqrst"), "1234567890", S("abcdefghijklmnopqrst1234567890"));
|
||||||
test1(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890"));
|
test1(S("abcdefghijklmnopqrst"), "12345678901234567890", S("abcdefghijklmnopqrst12345678901234567890"));
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ test3(S&& lhs, S&& rhs, const S& x)
|
|||||||
assert(move(lhs) + move(rhs) == x);
|
assert(move(lhs) + move(rhs) == x);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
|
|
||||||
typedef std::string S;
|
typedef std::string S;
|
||||||
|
|
||||||
@ -138,5 +138,5 @@ int main()
|
|||||||
test3(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890"));
|
test3(S("abcdefghijklmnopqrst"), S("1234567890"), S("abcdefghijklmnopqrst1234567890"));
|
||||||
test3(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890"));
|
test3(S("abcdefghijklmnopqrst"), S("12345678901234567890"), S("abcdefghijklmnopqrst12345678901234567890"));
|
||||||
|
|
||||||
#endif
|
#endif // _LIBCPP_MOVE
|
||||||
}
|
}
|
||||||
|
@ -67,4 +67,4 @@ public:
|
|||||||
{return !(x == y);}
|
{return !(x == y);}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // TEST_ALLOCATOR_H
|
||||||
|
@ -7,4 +7,4 @@ struct test_traits
|
|||||||
typedef charT char_type;
|
typedef charT char_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif // TEST_TRAITS_H
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
char16_t c = u'\0';
|
char16_t c = u'\0';
|
||||||
std::char_traits<char16_t>::assign(c, u'a');
|
std::char_traits<char16_t>::assign(c, u'a');
|
||||||
assert(c == u'a');
|
assert(c == u'a');
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,5 @@ int main()
|
|||||||
assert(s2[0] == char16_t(5));
|
assert(s2[0] == char16_t(5));
|
||||||
assert(s2[1] == char16_t(5));
|
assert(s2[1] == char16_t(5));
|
||||||
assert(s2[2] == char16_t(5));
|
assert(s2[2] == char16_t(5));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -38,5 +38,5 @@ int main()
|
|||||||
assert(std::char_traits<char16_t>::compare(u"223", u"123", 3) > 0);
|
assert(std::char_traits<char16_t>::compare(u"223", u"123", 3) > 0);
|
||||||
assert(std::char_traits<char16_t>::compare(u"133", u"123", 3) > 0);
|
assert(std::char_traits<char16_t>::compare(u"133", u"123", 3) > 0);
|
||||||
assert(std::char_traits<char16_t>::compare(u"124", u"123", 3) > 0);
|
assert(std::char_traits<char16_t>::compare(u"124", u"123", 3) > 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,5 @@ int main()
|
|||||||
assert(s2[0] == char16_t(1));
|
assert(s2[0] == char16_t(1));
|
||||||
assert(s2[1] == char16_t(2));
|
assert(s2[1] == char16_t(2));
|
||||||
assert(s2[2] == char16_t(3));
|
assert(s2[2] == char16_t(3));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
char16_t c = u'\0';
|
char16_t c = u'\0';
|
||||||
assert(std::char_traits<char16_t>::eq(u'a', u'a'));
|
assert(std::char_traits<char16_t>::eq(u'a', u'a'));
|
||||||
assert(!std::char_traits<char16_t>::eq(u'a', u'A'));
|
assert(!std::char_traits<char16_t>::eq(u'a', u'A'));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ int main()
|
|||||||
assert(!std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(), u'A'));
|
assert(!std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(), u'A'));
|
||||||
assert( std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(),
|
assert( std::char_traits<char16_t>::eq_int_type(std::char_traits<char16_t>::eof(),
|
||||||
std::char_traits<char16_t>::eof()));
|
std::char_traits<char16_t>::eof()));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,5 @@ int main()
|
|||||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(3)) == s1+2);
|
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(3)) == s1+2);
|
||||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(4)) == 0);
|
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(4)) == 0);
|
||||||
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(0)) == 0);
|
assert(std::char_traits<char16_t>::find(s1, 3, char16_t(0)) == 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ int main()
|
|||||||
assert(std::char_traits<char16_t>::length(u"aa") == 2);
|
assert(std::char_traits<char16_t>::length(u"aa") == 2);
|
||||||
assert(std::char_traits<char16_t>::length(u"aaa") == 3);
|
assert(std::char_traits<char16_t>::length(u"aaa") == 3);
|
||||||
assert(std::char_traits<char16_t>::length(u"aaaa") == 4);
|
assert(std::char_traits<char16_t>::length(u"aaaa") == 4);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
char16_t c = u'\0';
|
char16_t c = u'\0';
|
||||||
assert(!std::char_traits<char16_t>::lt(u'a', u'a'));
|
assert(!std::char_traits<char16_t>::lt(u'a', u'a'));
|
||||||
assert( std::char_traits<char16_t>::lt(u'A', u'a'));
|
assert( std::char_traits<char16_t>::lt(u'A', u'a'));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,5 @@ int main()
|
|||||||
assert(s1[0] == char16_t(2));
|
assert(s1[0] == char16_t(2));
|
||||||
assert(s1[1] == char16_t(2));
|
assert(s1[1] == char16_t(2));
|
||||||
assert(s1[2] == char16_t(3));
|
assert(s1[2] == char16_t(3));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ int main()
|
|||||||
assert(std::char_traits<char16_t>::not_eof(0) == 0);
|
assert(std::char_traits<char16_t>::not_eof(0) == 0);
|
||||||
assert(std::char_traits<char16_t>::not_eof(std::char_traits<char16_t>::eof()) !=
|
assert(std::char_traits<char16_t>::not_eof(std::char_traits<char16_t>::eof()) !=
|
||||||
std::char_traits<char16_t>::eof());
|
std::char_traits<char16_t>::eof());
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
assert(std::char_traits<char16_t>::to_char_type(u'a') == u'a');
|
assert(std::char_traits<char16_t>::to_char_type(u'a') == u'a');
|
||||||
assert(std::char_traits<char16_t>::to_char_type(u'A') == u'A');
|
assert(std::char_traits<char16_t>::to_char_type(u'A') == u'A');
|
||||||
assert(std::char_traits<char16_t>::to_char_type(0) == 0);
|
assert(std::char_traits<char16_t>::to_char_type(0) == 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
assert(std::char_traits<char16_t>::to_int_type(u'a') == u'a');
|
assert(std::char_traits<char16_t>::to_int_type(u'a') == u'a');
|
||||||
assert(std::char_traits<char16_t>::to_int_type(u'A') == u'A');
|
assert(std::char_traits<char16_t>::to_int_type(u'A') == u'A');
|
||||||
assert(std::char_traits<char16_t>::to_int_type(0) == 0);
|
assert(std::char_traits<char16_t>::to_int_type(0) == 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,5 @@ int main()
|
|||||||
static_assert((std::is_same<std::char_traits<char16_t>::off_type, std::streamoff>::value), "");
|
static_assert((std::is_same<std::char_traits<char16_t>::off_type, std::streamoff>::value), "");
|
||||||
static_assert((std::is_same<std::char_traits<char16_t>::pos_type, std::u16streampos>::value), "");
|
static_assert((std::is_same<std::char_traits<char16_t>::pos_type, std::u16streampos>::value), "");
|
||||||
static_assert((std::is_same<std::char_traits<char16_t>::state_type, std::mbstate_t>::value), "");
|
static_assert((std::is_same<std::char_traits<char16_t>::state_type, std::mbstate_t>::value), "");
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
char32_t c = U'\0';
|
char32_t c = U'\0';
|
||||||
std::char_traits<char32_t>::assign(c, U'a');
|
std::char_traits<char32_t>::assign(c, U'a');
|
||||||
assert(c == U'a');
|
assert(c == U'a');
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,5 @@ int main()
|
|||||||
assert(s2[0] == char32_t(5));
|
assert(s2[0] == char32_t(5));
|
||||||
assert(s2[1] == char32_t(5));
|
assert(s2[1] == char32_t(5));
|
||||||
assert(s2[2] == char32_t(5));
|
assert(s2[2] == char32_t(5));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -38,5 +38,5 @@ int main()
|
|||||||
assert(std::char_traits<char32_t>::compare(U"223", U"123", 3) > 0);
|
assert(std::char_traits<char32_t>::compare(U"223", U"123", 3) > 0);
|
||||||
assert(std::char_traits<char32_t>::compare(U"133", U"123", 3) > 0);
|
assert(std::char_traits<char32_t>::compare(U"133", U"123", 3) > 0);
|
||||||
assert(std::char_traits<char32_t>::compare(U"124", U"123", 3) > 0);
|
assert(std::char_traits<char32_t>::compare(U"124", U"123", 3) > 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,5 @@ int main()
|
|||||||
assert(s2[0] == char32_t(1));
|
assert(s2[0] == char32_t(1));
|
||||||
assert(s2[1] == char32_t(2));
|
assert(s2[1] == char32_t(2));
|
||||||
assert(s2[2] == char32_t(3));
|
assert(s2[2] == char32_t(3));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
char32_t c = U'\0';
|
char32_t c = U'\0';
|
||||||
assert(std::char_traits<char32_t>::eq(U'a', U'a'));
|
assert(std::char_traits<char32_t>::eq(U'a', U'a'));
|
||||||
assert(!std::char_traits<char32_t>::eq(U'a', U'A'));
|
assert(!std::char_traits<char32_t>::eq(U'a', U'A'));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ int main()
|
|||||||
assert(!std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(), U'A'));
|
assert(!std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(), U'A'));
|
||||||
assert( std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(),
|
assert( std::char_traits<char32_t>::eq_int_type(std::char_traits<char32_t>::eof(),
|
||||||
std::char_traits<char32_t>::eof()));
|
std::char_traits<char32_t>::eof()));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -25,5 +25,5 @@ int main()
|
|||||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(3)) == s1+2);
|
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(3)) == s1+2);
|
||||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(4)) == 0);
|
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(4)) == 0);
|
||||||
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(0)) == 0);
|
assert(std::char_traits<char32_t>::find(s1, 3, char32_t(0)) == 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ int main()
|
|||||||
assert(std::char_traits<char32_t>::length(U"aa") == 2);
|
assert(std::char_traits<char32_t>::length(U"aa") == 2);
|
||||||
assert(std::char_traits<char32_t>::length(U"aaa") == 3);
|
assert(std::char_traits<char32_t>::length(U"aaa") == 3);
|
||||||
assert(std::char_traits<char32_t>::length(U"aaaa") == 4);
|
assert(std::char_traits<char32_t>::length(U"aaaa") == 4);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
char32_t c = U'\0';
|
char32_t c = U'\0';
|
||||||
assert(!std::char_traits<char32_t>::lt(U'a', U'a'));
|
assert(!std::char_traits<char32_t>::lt(U'a', U'a'));
|
||||||
assert( std::char_traits<char32_t>::lt(U'A', U'a'));
|
assert( std::char_traits<char32_t>::lt(U'A', U'a'));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,5 @@ int main()
|
|||||||
assert(s1[0] == char32_t(2));
|
assert(s1[0] == char32_t(2));
|
||||||
assert(s1[1] == char32_t(2));
|
assert(s1[1] == char32_t(2));
|
||||||
assert(s1[2] == char32_t(3));
|
assert(s1[2] == char32_t(3));
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -24,5 +24,5 @@ int main()
|
|||||||
assert(std::char_traits<char32_t>::not_eof(0) == 0);
|
assert(std::char_traits<char32_t>::not_eof(0) == 0);
|
||||||
assert(std::char_traits<char32_t>::not_eof(std::char_traits<char32_t>::eof()) !=
|
assert(std::char_traits<char32_t>::not_eof(std::char_traits<char32_t>::eof()) !=
|
||||||
std::char_traits<char32_t>::eof());
|
std::char_traits<char32_t>::eof());
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
assert(std::char_traits<char32_t>::to_char_type(U'a') == U'a');
|
assert(std::char_traits<char32_t>::to_char_type(U'a') == U'a');
|
||||||
assert(std::char_traits<char32_t>::to_char_type(U'A') == U'A');
|
assert(std::char_traits<char32_t>::to_char_type(U'A') == U'A');
|
||||||
assert(std::char_traits<char32_t>::to_char_type(0) == 0);
|
assert(std::char_traits<char32_t>::to_char_type(0) == 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -22,5 +22,5 @@ int main()
|
|||||||
assert(std::char_traits<char32_t>::to_int_type(U'a') == U'a');
|
assert(std::char_traits<char32_t>::to_int_type(U'a') == U'a');
|
||||||
assert(std::char_traits<char32_t>::to_int_type(U'A') == U'A');
|
assert(std::char_traits<char32_t>::to_int_type(U'A') == U'A');
|
||||||
assert(std::char_traits<char32_t>::to_int_type(0) == 0);
|
assert(std::char_traits<char32_t>::to_int_type(0) == 0);
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,5 @@ int main()
|
|||||||
static_assert((std::is_same<std::char_traits<char32_t>::off_type, std::streamoff>::value), "");
|
static_assert((std::is_same<std::char_traits<char32_t>::off_type, std::streamoff>::value), "");
|
||||||
static_assert((std::is_same<std::char_traits<char32_t>::pos_type, std::u32streampos>::value), "");
|
static_assert((std::is_same<std::char_traits<char32_t>::pos_type, std::u32streampos>::value), "");
|
||||||
static_assert((std::is_same<std::char_traits<char32_t>::state_type, std::mbstate_t>::value), "");
|
static_assert((std::is_same<std::char_traits<char32_t>::state_type, std::mbstate_t>::value), "");
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
@ -26,5 +26,5 @@ int main()
|
|||||||
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
typedef std::u16string test3;
|
typedef std::u16string test3;
|
||||||
typedef std::u32string test4;
|
typedef std::u32string test4;
|
||||||
#endif
|
#endif // _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user