diff options
Diffstat (limited to 'libcxx/test/utilities/ratio')
21 files changed, 0 insertions, 874 deletions
diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_add.fail.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_add.fail.cpp deleted file mode 100644 index e4ced321329..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_add.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_add - -#include <ratio> - -int main() -{ - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_add<R1, R2>::type R; -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp deleted file mode 100644 index a537f0215ca..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_add.pass.cpp +++ /dev/null @@ -1,76 +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_add - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 2 && R::den == 1, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 3 && R::den == 2, ""); - } - { - typedef std::ratio<-1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 2, ""); - } - { - typedef std::ratio<1, -2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<-1, 1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, -1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<56987354, 467584654> R1; - typedef std::ratio<544668, 22145> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 127970191639601LL && R::den == 5177331081415LL, ""); - } - { - typedef std::ratio<0> R1; - typedef std::ratio<0> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 0 && R::den == 1, ""); - } - { - typedef std::ratio<1> R1; - typedef std::ratio<0> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 1, ""); - } - { - typedef std::ratio<0> R1; - typedef std::ratio<1> R2; - typedef std::ratio_add<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 1, ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_divide.fail.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_divide.fail.cpp deleted file mode 100644 index bdbcda36fab..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_divide.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_divide - -#include <ratio> - -int main() -{ - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<1, 2> R2; - typedef std::ratio_divide<R1, R2>::type R; -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp deleted file mode 100644 index 49b55e7a6ca..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_divide.pass.cpp +++ /dev/null @@ -1,58 +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_divide - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 1, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 2, ""); - } - { - typedef std::ratio<-1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, -2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<-1, 1> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, -1> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<56987354, 467584654> R1; - typedef std::ratio<544668, 22145> R2; - typedef std::ratio_divide<R1, R2>::type R; - static_assert(R::num == 630992477165LL && R::den == 127339199162436LL, ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_multiply.fail.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_multiply.fail.cpp deleted file mode 100644 index 81acc14be14..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_multiply.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_multiply - -#include <ratio> - -int main() -{ - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<2, 1> R2; - typedef std::ratio_multiply<R1, R2>::type R; -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp deleted file mode 100644 index ccf15e07aed..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_multiply.pass.cpp +++ /dev/null @@ -1,58 +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_multiply - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 1, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 2, ""); - } - { - typedef std::ratio<-1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, -2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<-1, 1> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, -1> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<56987354, 467584654> R1; - typedef std::ratio<544668, 22145> R2; - typedef std::ratio_multiply<R1, R2>::type R; - static_assert(R::num == 15519594064236LL && R::den == 5177331081415LL, ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_subtract.fail.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_subtract.fail.cpp deleted file mode 100644 index b8831438833..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_subtract.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_subtract - -#include <ratio> - -int main() -{ - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_subtract<R1, R2>::type R; -} diff --git a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp b/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp deleted file mode 100644 index 33efd90f555..00000000000 --- a/libcxx/test/utilities/ratio/ratio.arithmetic/ratio_subtract.pass.cpp +++ /dev/null @@ -1,76 +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_subtract - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == 0 && R::den == 1, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 2, ""); - } - { - typedef std::ratio<-1, 2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == -3 && R::den == 2, ""); - } - { - typedef std::ratio<1, -2> R1; - typedef std::ratio<1, 1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == -3 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<-1, 1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == 3 && R::den == 2, ""); - } - { - typedef std::ratio<1, 2> R1; - typedef std::ratio<1, -1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == 3 && R::den == 2, ""); - } - { - typedef std::ratio<56987354, 467584654> R1; - typedef std::ratio<544668, 22145> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == -126708206685271LL && R::den == 5177331081415LL, ""); - } - { - typedef std::ratio<0> R1; - typedef std::ratio<0> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == 0 && R::den == 1, ""); - } - { - typedef std::ratio<1> R1; - typedef std::ratio<0> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == 1 && R::den == 1, ""); - } - { - typedef std::ratio<0> R1; - typedef std::ratio<1> R2; - typedef std::ratio_subtract<R1, R2>::type R; - static_assert(R::num == -1 && R::den == 1, ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp b/libcxx/test/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp deleted file mode 100644 index 78027f7e48b..00000000000 --- a/libcxx/test/utilities/ratio/ratio.comparison/ratio_equal.pass.cpp +++ /dev/null @@ -1,56 +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_equal - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert((std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert((!std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((!std::ratio_equal<R1, R2>::value), ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp b/libcxx/test/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp deleted file mode 100644 index 9182a9ec503..00000000000 --- a/libcxx/test/utilities/ratio/ratio.comparison/ratio_greater.pass.cpp +++ /dev/null @@ -1,56 +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_greater - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert((!std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((!std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert((std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_greater<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((std::ratio_greater<R1, R2>::value), ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp b/libcxx/test/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp deleted file mode 100644 index a1f5a185e62..00000000000 --- a/libcxx/test/utilities/ratio/ratio.comparison/ratio_greater_equal.pass.cpp +++ /dev/null @@ -1,56 +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_greater_equal - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_greater_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((std::ratio_greater_equal<R1, R2>::value), ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.comparison/ratio_less.pass.cpp b/libcxx/test/utilities/ratio/ratio.comparison/ratio_less.pass.cpp deleted file mode 100644 index db53ab0ad44..00000000000 --- a/libcxx/test/utilities/ratio/ratio.comparison/ratio_less.pass.cpp +++ /dev/null @@ -1,86 +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_less - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFELL> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFDLL, 0x7FFFFFFFFFFFFFFCLL> R2; - static_assert((std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFDLL, 0x7FFFFFFFFFFFFFFCLL> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFELL> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFDLL, 0x7FFFFFFFFFFFFFFCLL> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFELL> R2; - static_assert((std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFELL> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFELL, 0x7FFFFFFFFFFFFFFDLL> R2; - static_assert((std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<641981, 1339063> R1; - typedef std::ratio<1291640, 2694141LL> R2; - static_assert((!std::ratio_less<R1, R2>::value), ""); - } - { - typedef std::ratio<1291640, 2694141LL> R1; - typedef std::ratio<641981, 1339063> R2; - static_assert((std::ratio_less<R1, R2>::value), ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp b/libcxx/test/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp deleted file mode 100644 index 5b148f0e143..00000000000 --- a/libcxx/test/utilities/ratio/ratio.comparison/ratio_less_equal.pass.cpp +++ /dev/null @@ -1,56 +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_less_equal - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert((std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert((!std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_less_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((!std::ratio_less_equal<R1, R2>::value), ""); - } -} diff --git a/libcxx/test/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp b/libcxx/test/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp deleted file mode 100644 index ebf93074658..00000000000 --- a/libcxx/test/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp +++ /dev/null @@ -1,56 +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_not_equal - -#include <ratio> - -int main() -{ - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, 1> R2; - static_assert((!std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((!std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((!std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 1> R1; - typedef std::ratio<1, -1> R2; - static_assert((std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; - typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; - static_assert((std::ratio_not_equal<R1, R2>::value), ""); - } - { - typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; - typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; - static_assert((std::ratio_not_equal<R1, R2>::value), ""); - } -} 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; -} diff --git a/libcxx/test/utilities/ratio/ratio.si/nothing_to_do.pass.cpp b/libcxx/test/utilities/ratio/ratio.si/nothing_to_do.pass.cpp deleted file mode 100644 index b58f5c55b64..00000000000 --- a/libcxx/test/utilities/ratio/ratio.si/nothing_to_do.pass.cpp +++ /dev/null @@ -1,12 +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. -// -//===----------------------------------------------------------------------===// - -int main() -{ -} diff --git a/libcxx/test/utilities/ratio/typedefs.pass.cpp b/libcxx/test/utilities/ratio/typedefs.pass.cpp deleted file mode 100644 index 5ab4c740ddb..00000000000 --- a/libcxx/test/utilities/ratio/typedefs.pass.cpp +++ /dev/null @@ -1,32 +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 typedef's - -#include <ratio> - -int main() -{ - static_assert(std::atto::num == 1 && std::atto::den == 1000000000000000000ULL, ""); - static_assert(std::femto::num == 1 && std::femto::den == 1000000000000000ULL, ""); - static_assert(std::pico::num == 1 && std::pico::den == 1000000000000ULL, ""); - static_assert(std::nano::num == 1 && std::nano::den == 1000000000ULL, ""); - static_assert(std::micro::num == 1 && std::micro::den == 1000000ULL, ""); - static_assert(std::milli::num == 1 && std::milli::den == 1000ULL, ""); - static_assert(std::centi::num == 1 && std::centi::den == 100ULL, ""); - static_assert(std::deci::num == 1 && std::deci::den == 10ULL, ""); - static_assert(std::deca::num == 10ULL && std::deca::den == 1, ""); - static_assert(std::hecto::num == 100ULL && std::hecto::den == 1, ""); - static_assert(std::kilo::num == 1000ULL && std::kilo::den == 1, ""); - static_assert(std::mega::num == 1000000ULL && std::mega::den == 1, ""); - static_assert(std::giga::num == 1000000000ULL && std::giga::den == 1, ""); - static_assert(std::tera::num == 1000000000000ULL && std::tera::den == 1, ""); - static_assert(std::peta::num == 1000000000000000ULL && std::peta::den == 1, ""); - static_assert(std::exa::num == 1000000000000000000ULL && std::exa::den == 1, ""); -} diff --git a/libcxx/test/utilities/ratio/version.pass.cpp b/libcxx/test/utilities/ratio/version.pass.cpp deleted file mode 100644 index 26c455fb0a9..00000000000 --- a/libcxx/test/utilities/ratio/version.pass.cpp +++ /dev/null @@ -1,20 +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. -// -//===----------------------------------------------------------------------===// - -// <ratio> - -#include <ratio> - -#ifndef _LIBCPP_VERSION -#error _LIBCPP_VERSION not defined -#endif - -int main() -{ -} |

