diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:08 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:08 +0000 |
commit | 0564cdb94a7a1facbb0dbf888ceb90638aa70ecd (patch) | |
tree | 3ccbf1ba827928fca93419d0b6cf83ce0f650f2a /test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp | |
parent | dbabdb5220c44e5938d404eefb84b5ed55667ea8 (diff) |
Notes
Diffstat (limited to 'test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp')
-rw-r--r-- | test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp b/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp index 982bb43289d7..edd5c6e32d56 100644 --- a/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp +++ b/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp @@ -69,9 +69,9 @@ bool operator!=(const poca_alloc<T>& lhs, const poca_alloc<U>& rhs) template <class S> void test_assign(S &s1, const S& s2) { - try { s1 = s2; } - catch ( std::bad_alloc &) { return; } - assert(false); + try { s1 = s2; } + catch ( std::bad_alloc &) { return; } + assert(false); } #endif @@ -110,21 +110,21 @@ int main() { typedef poca_alloc<char> A; typedef std::basic_string<char, std::char_traits<char>, A> S; - const char * p1 = "This is my first string"; - const char * p2 = "This is my second string"; + const char * p1 = "This is my first string"; + const char * p2 = "This is my second string"; alloc_imp<char> imp1; alloc_imp<char> imp2; - S s1(p1, A(&imp1)); - S s2(p2, A(&imp2)); + S s1(p1, A(&imp1)); + S s2(p2, A(&imp2)); - assert(s1 == p1); - assert(s2 == p2); + assert(s1 == p1); + assert(s2 == p2); - imp2.deactivate(); - test_assign(s1, s2); - assert(s1 == p1); - assert(s2 == p2); + imp2.deactivate(); + test_assign(s1, s2); + assert(s1 == p1); + assert(s2 == p2); } #endif #endif |