summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/numerics
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-15 01:50:31 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-15 01:50:31 +0000
commit0a707553a57e4106162a8ed8d8459098e36a7943 (patch)
tree8e3d2c9897ea06c28e866383f841e32d3e214d43 /libcxx/test/std/numerics
parent5d3e09ecc102224bd346c8437735f9c98a8b29c2 (diff)
downloadbcm5719-llvm-0a707553a57e4106162a8ed8d8459098e36a7943.tar.gz
bcm5719-llvm-0a707553a57e4106162a8ed8d8459098e36a7943.zip
Improve portability of random_device tests. Patch from STL@microsoft.com
llvm-svn: 272746
Diffstat (limited to 'libcxx/test/std/numerics')
-rw-r--r--libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp4
-rw-r--r--libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
index 9709484eb42..8c45bb19a0a 100644
--- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -27,6 +27,8 @@
#include <unistd.h>
#endif
+#include "test_macros.h"
+
bool is_valid_random_device(const std::string &token) {
#if defined(_LIBCPP_USING_DEV_RANDOM)
@@ -44,7 +46,7 @@ void check_random_device_valid(const std::string &token) {
void check_random_device_invalid(const std::string &token) {
try {
std::random_device r(token);
- assert(false);
+ LIBCPP_ASSERT(false);
} catch (const std::system_error&) {
}
}
diff --git a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
index e319e0f4eed..eabcc201e06 100644
--- a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -17,6 +17,8 @@
#include <random>
#include <cassert>
+#include "test_macros.h"
+
int main()
{
{
@@ -28,7 +30,7 @@ int main()
{
std::random_device r("/dev/null");
r();
- assert(false);
+ LIBCPP_ASSERT(false);
}
catch (const std::system_error&)
{
OpenPOWER on IntegriCloud