[libcxx] r228928 - Remove undefined behavior from test; specifically, compare(NULL, XXX, 0)
Marshall Clow
mclow.lists at gmail.com
Thu Feb 12 07:25:54 PST 2015
Author: marshall
Date: Thu Feb 12 09:25:54 2015
New Revision: 228928
URL: http://llvm.org/viewvc/llvm-project?rev=228928&view=rev
Log:
Remove undefined behavior from test; specifically, compare(NULL, XXX, 0)
Modified:
libcxx/trunk/test/std/experimental/string.view/string.view.ops/basic_string.pass.cpp
Modified: libcxx/trunk/test/std/experimental/string.view/string.view.ops/basic_string.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/experimental/string.view/string.view.ops/basic_string.pass.cpp?rev=228928&r1=228927&r2=228928&view=diff
==============================================================================
--- libcxx/trunk/test/std/experimental/string.view/string.view.ops/basic_string.pass.cpp (original)
+++ libcxx/trunk/test/std/experimental/string.view/string.view.ops/basic_string.pass.cpp Thu Feb 12 09:25:54 2015
@@ -33,8 +33,8 @@ void test ( const CharT *s ) {
string_view_t sv1;
string_t str = (string_t) sv1;
+ assert ( sv1.size() == 0);
assert ( sv1.size() == str.size ());
- assert ( std::char_traits<CharT>::compare ( sv1.data(), str.data(), sv1.size()) == 0 );
}
}
More information about the cfe-commits
mailing list