Stephan T. Lavavej
|
eae7e51a7d
|
[libcxx] [test] Fix string_view tests.
test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp
Passing -1 to size_t triggers signed/unsigned mismatch warnings because it's
a value-modifying conversion. Add static_cast<size_t> to soothe the compiler.
(This file refers to size_t unqualified.)
test/std/strings/string.view/string.view.ops/substr.pass.cpp
Add <algorithm> for std::min() and <stdexcept> for std::out_of_range.
N4618 21.4.2.4 [string.view.access]/1: "Requires: pos < size()."
/4: "[ Note: Unlike basic_string::operator[], basic_string_view::operator[](size())
has undefined behavior instead of returning charT(). -end note ]"
Fixes D27633.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289283 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-12-09 22:35:53 +00:00 |
|
Stephan T. Lavavej
|
e619862dbf
|
[libcxx] [test] Replace _LIBCPP_STD_VER with TEST_STD_VER.
This replaces every occurrence of _LIBCPP_STD_VER in the tests with
TEST_STD_VER. Additionally, for every affected
file, #include "test_macros.h" is being added explicitly if it wasn't
already there.
https://reviews.llvm.org/D26294
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@286007 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-11-04 20:26:59 +00:00 |
|
Eric Fiselier
|
04b7f3da2b
|
Add missing include in string_view tests. Patch from Billy ONeil @ microsoft
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285012 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-10-24 20:11:17 +00:00 |
|
Marshall Clow
|
7c56f99282
|
Again, w/o the tabs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276273 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-07-21 13:19:36 +00:00 |
|
Marshall Clow
|
f82c1cef1d
|
Another fix to appease the no-exception bots.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276272 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-07-21 13:18:50 +00:00 |
|
Marshall Clow
|
15362334f6
|
Fix some string_view tests that were failing when exceptions were disabled. Also comment out a _LIBCPP_ASSERT that gcc4.9 was complaining about. Will revisit that later.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276241 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-07-21 06:24:04 +00:00 |
|
Marshall Clow
|
1e00d6db31
|
Implement std::string_view as described in http://wg21.link/P0254R1. Reviewed as https://reviews.llvm.org/D21459
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@276238 91177308-0d34-0410-b5e6-96231b3b80d8
|
2016-07-21 05:31:24 +00:00 |
|