diff options
Diffstat (limited to 'libcxx/test/utilities/ratio/ratio.ratio')
4 files changed, 0 insertions, 100 deletions
diff --git a/libcxx/test/utilities/ratio/ratio.ratio/ratio.pass.cpp b/libcxx/test/utilities/ratio/ratio.ratio/ratio.pass.cpp deleted file mode 100644 index f942c96b4cb..00000000000 --- a/libcxx/test/utilities/ratio/ratio.ratio/ratio.pass.cpp +++ /dev/null @@ -1,44 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 ratio: The static data members num and den shall have thcommon -// divisor of the absolute values of N and D: - -#include <ratio> - -template <long long N, long long D, long long eN, long long eD> -void test() -{ - static_assert((std::ratio<N, D>::num == eN), ""); - static_assert((std::ratio<N, D>::den == eD), ""); -} - -int main() -{ - test<1, 1, 1, 1>(); - test<1, 10, 1, 10>(); - test<10, 10, 1, 1>(); - test<10, 1, 10, 1>(); - test<12, 4, 3, 1>(); - test<12, -4, -3, 1>(); - test<-12, 4, -3, 1>(); - test<-12, -4, 3, 1>(); - test<4, 12, 1, 3>(); - test<4, -12, -1, 3>(); - test<-4, 12, -1, 3>(); - test<-4, -12, 1, 3>(); - test<222, 333, 2, 3>(); - test<222, -333, -2, 3>(); - test<-222, 333, -2, 3>(); - test<-222, -333, 2, 3>(); - test<0x7FFFFFFFFFFFFFFFLL, 127, 72624976668147841LL, 1>(); - test<-0x7FFFFFFFFFFFFFFFLL, 127, -72624976668147841LL, 1>(); - test<0x7FFFFFFFFFFFFFFFLL, -127, -72624976668147841LL, 1>(); - test<-0x7FFFFFFFFFFFFFFFLL, -127, 72624976668147841LL, 1>(); -} diff --git a/libcxx/test/utilities/ratio/ratio.ratio/ratio1.fail.cpp b/libcxx/test/utilities/ratio/ratio.ratio/ratio1.fail.cpp deleted file mode 100644 index e6dbf710b71..00000000000 --- a/libcxx/test/utilities/ratio/ratio.ratio/ratio1.fail.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 ratio: The template argument D shall not be zero - -#include <ratio> -#include <cstdint> - -int main() -{ - const std::intmax_t t1 = std::ratio<1, 0>::num; -} diff --git a/libcxx/test/utilities/ratio/ratio.ratio/ratio2.fail.cpp b/libcxx/test/utilities/ratio/ratio.ratio/ratio2.fail.cpp deleted file mode 100644 index 753e79af6d0..00000000000 --- a/libcxx/test/utilities/ratio/ratio.ratio/ratio2.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 ratio: the absolute values of the template arguments N and D -// shall be representable by type intmax_t. - -#include <ratio> -#include <cstdint> - -int main() -{ - const std::intmax_t t1 = std::ratio<0x8000000000000000ULL, 1>::num; -} diff --git a/libcxx/test/utilities/ratio/ratio.ratio/ratio3.fail.cpp b/libcxx/test/utilities/ratio/ratio.ratio/ratio3.fail.cpp deleted file mode 100644 index f4b4ab95001..00000000000 --- a/libcxx/test/utilities/ratio/ratio.ratio/ratio3.fail.cpp +++ /dev/null @@ -1,19 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// 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 ratio: the absolute values of the template arguments N and D -// shall be representable by type intmax_t. - -#include <ratio> -#include <cstdint> - -int main() -{ - const std::intmax_t t1 = std::ratio<1, 0x8000000000000000ULL>::num; -} |

