Move the test for zero-length into the char_traits (from string_view). Add tests to char_traits specializations

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@228981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2015-02-12 23:34:52 +00:00
parent 7f59a88431
commit f2e36ef093
6 changed files with 7 additions and 3 deletions

View File

@@ -21,6 +21,7 @@ int main()
#ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
#if __cplusplus >= 201103L
assert(std::char_traits<char32_t>::compare(U"", U"", 0) == 0);
assert(std::char_traits<char32_t>::compare(NULL, NULL, 0) == 0);
assert(std::char_traits<char32_t>::compare(U"1", U"1", 1) == 0);
assert(std::char_traits<char32_t>::compare(U"1", U"2", 1) < 0);