Revert "Update aosp/master libcxx rebase to r263688"
The world is burning. This reverts commitc004fd909c, reversing changes made to1418e4163d.
This commit is contained in:
@@ -11,57 +11,46 @@
|
||||
|
||||
#include <ratio>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
template <class Rat1, class Rat2, bool result>
|
||||
void test()
|
||||
{
|
||||
static_assert((result == std::ratio_equal<Rat1, Rat2>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((result == std::ratio_equal_v<Rat1, Rat2>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
{
|
||||
typedef std::ratio<1, 1> R1;
|
||||
typedef std::ratio<1, 1> R2;
|
||||
test<R1, R2, true>();
|
||||
static_assert((std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1;
|
||||
typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2;
|
||||
test<R1, R2, true>();
|
||||
static_assert((std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1;
|
||||
typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2;
|
||||
test<R1, R2, true>();
|
||||
static_assert((std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1;
|
||||
typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R2;
|
||||
test<R1, R2, true>();
|
||||
static_assert((std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<1, 1> R1;
|
||||
typedef std::ratio<1, -1> R2;
|
||||
test<R1, R2, false>();
|
||||
static_assert((!std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R1;
|
||||
typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R2;
|
||||
test<R1, R2, false>();
|
||||
static_assert((!std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<-0x7FFFFFFFFFFFFFFFLL, 1> R1;
|
||||
typedef std::ratio<0x7FFFFFFFFFFFFFFFLL, 1> R2;
|
||||
test<R1, R2, false>();
|
||||
static_assert((!std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
{
|
||||
typedef std::ratio<1, 0x7FFFFFFFFFFFFFFFLL> R1;
|
||||
typedef std::ratio<1, -0x7FFFFFFFFFFFFFFFLL> R2;
|
||||
test<R1, R2, false>();
|
||||
static_assert((!std::ratio_equal<R1, R2>::value), "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user