From 5a83710e371fe68a06e6e3876c6a2c8b820a8976 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Sat, 20 Dec 2014 01:40:03 +0000 Subject: Move test into test/std subdirectory. llvm-svn: 224658 --- .../ratio.comparison/ratio_not_equal.pass.cpp | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp (limited to 'libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp') diff --git a/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp new file mode 100644 index 00000000000..ebf93074658 --- /dev/null +++ b/libcxx/test/std/utilities/ratio/ratio.comparison/ratio_not_equal.pass.cpp @@ -0,0 +1,56 @@ +//===----------------------------------------------------------------------===// +// +// 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 + +int main() +{ + { + typedef std::ratio<1, 1> R1; + typedef std::ratio<1, 1> R2; + static_assert((!std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; + typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; + static_assert((!std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; + typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; + static_assert((!std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; + typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2; + static_assert((!std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<1, 1> R1; + typedef std::ratio<1, -1> R2; + static_assert((std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1; + typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2; + static_assert((std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1; + typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2; + static_assert((std::ratio_not_equal::value), ""); + } + { + typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1; + typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2; + static_assert((std::ratio_not_equal::value), ""); + } +} -- cgit v1.2.3