Index: test/std/numerics/rand/rand.device/ctor.pass.cpp =================================================================== --- test/std/numerics/rand/rand.device/ctor.pass.cpp +++ test/std/numerics/rand/rand.device/ctor.pass.cpp @@ -27,6 +27,8 @@ #include #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_invalid(const std::string &token) { try { std::random_device r(token); - assert(false); + LIBCPP_ASSERT(false); } catch (const std::system_error&) { } } Index: test/std/numerics/rand/rand.device/eval.pass.cpp =================================================================== --- test/std/numerics/rand/rand.device/eval.pass.cpp +++ test/std/numerics/rand/rand.device/eval.pass.cpp @@ -17,6 +17,8 @@ #include #include +#include "test_macros.h" + int main() { { @@ -28,7 +30,7 @@ { std::random_device r("/dev/null"); r(); - assert(false); + LIBCPP_ASSERT(false); } catch (const std::system_error&) {