diff options
Diffstat (limited to 'test/libcxx/numerics')
-rw-r--r-- | test/libcxx/numerics/c.math/constexpr-fns.pass.cpp | 6 | ||||
-rw-r--r-- | test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp | 28 |
2 files changed, 31 insertions, 3 deletions
diff --git a/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp b/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp index 9123be1f0990..a58c389cd7ac 100644 --- a/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp +++ b/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp @@ -23,9 +23,9 @@ #include <cmath> -static_assert(std::__libcpp_isnan(0.) == false, ""); -static_assert(std::__libcpp_isinf(0.0) == false, ""); -static_assert(std::__libcpp_isfinite(0.0) == true, ""); +static_assert(std::__libcpp_isnan_or_builtin(0.) == false, ""); +static_assert(std::__libcpp_isinf_or_builtin(0.0) == false, ""); +static_assert(std::__libcpp_isfinite_or_builtin(0.0) == true, ""); int main() { diff --git a/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp b/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp new file mode 100644 index 000000000000..37aaa2acf1d9 --- /dev/null +++ b/test/libcxx/numerics/c.math/fdelayed-template-parsing.sh.cpp @@ -0,0 +1,28 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// test that cmath builds with -fdelayed-template-parsing + +// REQUIRES: fdelayed-template-parsing + +// RUN: %build -fdelayed-template-parsing +// RUN: %run + +#include <cmath> +#include <cassert> + +#include "test_macros.h" + +int main() { + assert(std::isfinite(1.0)); + assert(!std::isinf(1.0)); + assert(!std::isnan(1.0)); +} + +using namespace std; |