summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-02-16 19:10:44 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-02-16 19:10:44 +0000
commit6100a9db7de1d3dd60045622df161b6288fdf88a (patch)
treea00bb5915855db728c1303173c24d603bac06009
parent40e3ad2a19d821f293dbfc500beb6b9f7af41db2 (diff)
downloadsrc-test2-6100a9db7de1d3dd60045622df161b6288fdf88a.tar.gz
src-test2-6100a9db7de1d3dd60045622df161b6288fdf88a.zip
Notes
-rw-r--r--CMakeLists.txt3
-rw-r--r--test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp13
-rw-r--r--test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp6
3 files changed, 14 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb079d256181..9e8e9d5e3d9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -135,6 +135,9 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
elseif (APPLE)
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
set(LIBCXX_CXX_ABI_SYSTEM 1)
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+ set(LIBCXX_CXX_ABI_LIBNAME "libcxxrt")
+ set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
else()
set(LIBCXX_CXX_ABI_LIBNAME "default")
endif()
diff --git a/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp b/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp
index e7bdd897c745..460e4c07ec9f 100644
--- a/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp
+++ b/test/std/input.output/stream.buffers/streambuf/streambuf.protected/streambuf.put.area/pbump2gig.pass.cpp
@@ -32,12 +32,13 @@ int main()
#ifndef TEST_HAS_NO_EXCEPTIONS
try {
#endif
- std::string str(2147483648, 'a');
- SB sb;
- sb.str(str);
- assert(sb.pubpbase() <= sb.pubpptr());
+ std::string str(2147483648, 'a');
+ SB sb;
+ sb.str(str);
+ assert(sb.pubpbase() <= sb.pubpptr());
#ifndef TEST_HAS_NO_EXCEPTIONS
- }
- catch (const std::bad_alloc &) {}
+ }
+ catch (const std::length_error &) {} // maybe the string can't take 2GB
+ catch (const std::bad_alloc &) {} // maybe we don't have enough RAM
#endif
}
diff --git a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp
index e4a3d203ce7f..52100c30404c 100644
--- a/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp
+++ b/test/std/utilities/meta/meta.unary/meta.unary.prop/has_unique_object_representations.pass.cpp
@@ -55,7 +55,8 @@ class NotEmpty
virtual ~NotEmpty();
};
-union Union {};
+union EmptyUnion {};
+struct NonEmptyUnion {int x; unsigned y;};
struct bit_zero
{
@@ -84,6 +85,7 @@ int main()
{
test_has_not_has_unique_object_representations<void>();
test_has_not_has_unique_object_representations<Empty>();
+ test_has_not_has_unique_object_representations<EmptyUnion>();
test_has_not_has_unique_object_representations<NotEmpty>();
test_has_not_has_unique_object_representations<bit_zero>();
test_has_not_has_unique_object_representations<Abstract>();
@@ -97,7 +99,7 @@ int main()
test_has_unique_object_representations<unsigned>();
- test_has_unique_object_representations<Union>();
+ test_has_unique_object_representations<NonEmptyUnion>();
test_has_unique_object_representations<char[3]>();
test_has_unique_object_representations<char[]>();