[libcxx] [test] Untabify, NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@309464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -46,8 +46,8 @@ public:
|
||||
class C
|
||||
{
|
||||
public:
|
||||
virtual ~C() {}
|
||||
C * operator&() const { assert(false); return nullptr; } // should not be called
|
||||
virtual ~C() {}
|
||||
C * operator&() const { assert(false); return nullptr; } // should not be called
|
||||
};
|
||||
|
||||
class D : private std::nested_exception {};
|
||||
|
||||
@@ -16,24 +16,24 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b1, std::byte b2) {
|
||||
std::byte bret = b1;
|
||||
return bret &= b2;
|
||||
}
|
||||
std::byte bret = b1;
|
||||
return bret &= b2;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
|
||||
static_assert(noexcept(b &= b), "" );
|
||||
static_assert(noexcept(b &= b), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(test(b1, b8)) == 0, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b9)) == 1, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b9)) == 8, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b8)) == 0, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b9)) == 1, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b9)) == 8, "");
|
||||
|
||||
static_assert(std::to_integer<int>(test(b8, b1)) == 0, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b1)) == 1, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b8)) == 8, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b1)) == 0, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b1)) == 1, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b8)) == 8, "");
|
||||
}
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
// constexpr byte operator&(byte l, byte r) noexcept;
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
|
||||
static_assert(noexcept(b1 & b8), "" );
|
||||
static_assert(noexcept(b1 & b8), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(b1 & b8) == 0, "");
|
||||
static_assert(std::to_integer<int>(b1 & b9) == 1, "");
|
||||
static_assert(std::to_integer<int>(b8 & b9) == 8, "");
|
||||
static_assert(std::to_integer<int>(b1 & b8) == 0, "");
|
||||
static_assert(std::to_integer<int>(b1 & b9) == 1, "");
|
||||
static_assert(std::to_integer<int>(b8 & b9) == 8, "");
|
||||
|
||||
static_assert(std::to_integer<int>(b8 & b1) == 0, "");
|
||||
static_assert(std::to_integer<int>(b9 & b1) == 1, "");
|
||||
static_assert(std::to_integer<int>(b9 & b8) == 8, "");
|
||||
static_assert(std::to_integer<int>(b8 & b1) == 0, "");
|
||||
static_assert(std::to_integer<int>(b9 & b1) == 1, "");
|
||||
static_assert(std::to_integer<int>(b9 & b8) == 8, "");
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b) {
|
||||
return b <<= 2.0;
|
||||
}
|
||||
return b <<= 2.0;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1 = test(std::byte{1});
|
||||
constexpr std::byte b1 = test(std::byte{1});
|
||||
}
|
||||
|
||||
@@ -19,18 +19,18 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b) {
|
||||
return b <<= 2;
|
||||
}
|
||||
return b <<= 2;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b3{static_cast<std::byte>(3)};
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b3{static_cast<std::byte>(3)};
|
||||
|
||||
static_assert(noexcept(b <<= 2), "" );
|
||||
static_assert(noexcept(b <<= 2), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(test(b2)) == 8, "" );
|
||||
static_assert(std::to_integer<int>(test(b3)) == 12, "" );
|
||||
static_assert(std::to_integer<int>(test(b2)) == 8, "" );
|
||||
static_assert(std::to_integer<int>(test(b3)) == 12, "" );
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
// is_integral_v<IntegerType> is true.
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2 = b1 << 2.0f;
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2 = b1 << 2.0f;
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
// is_integral_v<IntegerType> is true.
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b3{static_cast<std::byte>(3)};
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b3{static_cast<std::byte>(3)};
|
||||
|
||||
static_assert(noexcept(b3 << 2), "" );
|
||||
static_assert(noexcept(b3 << 2), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(b1 << 1) == 2, "");
|
||||
static_assert(std::to_integer<int>(b1 << 2) == 4, "");
|
||||
static_assert(std::to_integer<int>(b3 << 4) == 48, "");
|
||||
static_assert(std::to_integer<int>(b3 << 6) == 192, "");
|
||||
static_assert(std::to_integer<int>(b1 << 1) == 2, "");
|
||||
static_assert(std::to_integer<int>(b1 << 2) == 4, "");
|
||||
static_assert(std::to_integer<int>(b3 << 4) == 48, "");
|
||||
static_assert(std::to_integer<int>(b3 << 6) == 192, "");
|
||||
}
|
||||
|
||||
@@ -15,13 +15,13 @@
|
||||
// constexpr byte operator~(byte b) noexcept;
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
|
||||
static_assert(noexcept(~b1), "" );
|
||||
static_assert(noexcept(~b1), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(~b1) == 254, "");
|
||||
static_assert(std::to_integer<int>(~b2) == 253, "");
|
||||
static_assert(std::to_integer<int>(~b8) == 247, "");
|
||||
static_assert(std::to_integer<int>(~b1) == 254, "");
|
||||
static_assert(std::to_integer<int>(~b2) == 253, "");
|
||||
static_assert(std::to_integer<int>(~b8) == 247, "");
|
||||
}
|
||||
|
||||
@@ -16,25 +16,25 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b1, std::byte b2) {
|
||||
std::byte bret = b1;
|
||||
return bret |= b2;
|
||||
}
|
||||
std::byte bret = b1;
|
||||
return bret |= b2;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
|
||||
static_assert(noexcept(b |= b), "" );
|
||||
static_assert(noexcept(b |= b), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(test(b1, b2)) == 3, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b8)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b2, b8)) == 10, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b2)) == 3, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b8)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b2, b8)) == 10, "");
|
||||
|
||||
static_assert(std::to_integer<int>(test(b2, b1)) == 3, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b1)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b2)) == 10, "");
|
||||
static_assert(std::to_integer<int>(test(b2, b1)) == 3, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b1)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b2)) == 10, "");
|
||||
|
||||
}
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
// constexpr byte operator|(byte l, byte r) noexcept;
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2{static_cast<std::byte>(2)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
|
||||
static_assert(noexcept(b1 | b2), "" );
|
||||
static_assert(noexcept(b1 | b2), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(b1 | b2) == 3, "");
|
||||
static_assert(std::to_integer<int>(b1 | b8) == 9, "");
|
||||
static_assert(std::to_integer<int>(b2 | b8) == 10, "");
|
||||
static_assert(std::to_integer<int>(b1 | b2) == 3, "");
|
||||
static_assert(std::to_integer<int>(b1 | b8) == 9, "");
|
||||
static_assert(std::to_integer<int>(b2 | b8) == 10, "");
|
||||
|
||||
static_assert(std::to_integer<int>(b2 | b1) == 3, "");
|
||||
static_assert(std::to_integer<int>(b8 | b1) == 9, "");
|
||||
static_assert(std::to_integer<int>(b8 | b2) == 10, "");
|
||||
static_assert(std::to_integer<int>(b2 | b1) == 3, "");
|
||||
static_assert(std::to_integer<int>(b8 | b1) == 9, "");
|
||||
static_assert(std::to_integer<int>(b8 | b2) == 10, "");
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b) {
|
||||
return b >>= 2.0;
|
||||
}
|
||||
return b >>= 2.0;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1 = test(std::byte{1});
|
||||
constexpr std::byte b1 = test(std::byte{1});
|
||||
}
|
||||
|
||||
@@ -19,17 +19,17 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b) {
|
||||
return b >>= 2;
|
||||
}
|
||||
return b >>= 2;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b16{static_cast<std::byte>(16)};
|
||||
constexpr std::byte b192{static_cast<std::byte>(192)};
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b16{static_cast<std::byte>(16)};
|
||||
constexpr std::byte b192{static_cast<std::byte>(192)};
|
||||
|
||||
static_assert(noexcept(b >>= 2), "" );
|
||||
static_assert(noexcept(b >>= 2), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(test(b16)) == 4, "" );
|
||||
static_assert(std::to_integer<int>(test(b192)) == 48, "" );
|
||||
static_assert(std::to_integer<int>(test(b16)) == 4, "" );
|
||||
static_assert(std::to_integer<int>(test(b192)) == 48, "" );
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
// is_integral_v<IntegerType> is true.
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2 = b1 >> 2.0f;
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b2 = b1 >> 2.0f;
|
||||
}
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b) {
|
||||
return b <<= 2;
|
||||
}
|
||||
return b <<= 2;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b100{static_cast<std::byte>(100)};
|
||||
constexpr std::byte b115{static_cast<std::byte>(115)};
|
||||
constexpr std::byte b100{static_cast<std::byte>(100)};
|
||||
constexpr std::byte b115{static_cast<std::byte>(115)};
|
||||
|
||||
static_assert(noexcept(b100 << 2), "" );
|
||||
static_assert(noexcept(b100 << 2), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(b100 >> 1) == 50, "");
|
||||
static_assert(std::to_integer<int>(b100 >> 2) == 25, "");
|
||||
static_assert(std::to_integer<int>(b115 >> 3) == 14, "");
|
||||
static_assert(std::to_integer<int>(b115 >> 6) == 1, "");
|
||||
static_assert(std::to_integer<int>(b100 >> 1) == 50, "");
|
||||
static_assert(std::to_integer<int>(b100 >> 2) == 25, "");
|
||||
static_assert(std::to_integer<int>(b115 >> 3) == 14, "");
|
||||
static_assert(std::to_integer<int>(b115 >> 6) == 1, "");
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,6 @@
|
||||
// is_integral_v<IntegerType> is true.
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
auto f = std::to_integer<float>(b1);
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
auto f = std::to_integer<float>(b1);
|
||||
}
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
// is_integral_v<IntegerType> is true.
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b3{static_cast<std::byte>(3)};
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b3{static_cast<std::byte>(3)};
|
||||
|
||||
static_assert(noexcept(std::to_integer<int>(b1)), "" );
|
||||
static_assert(std::is_same<int, decltype(std::to_integer<int>(b1))>::value, "" );
|
||||
static_assert(std::is_same<long, decltype(std::to_integer<long>(b1))>::value, "" );
|
||||
static_assert(std::is_same<unsigned short, decltype(std::to_integer<unsigned short>(b1))>::value, "" );
|
||||
static_assert(noexcept(std::to_integer<int>(b1)), "" );
|
||||
static_assert(std::is_same<int, decltype(std::to_integer<int>(b1))>::value, "" );
|
||||
static_assert(std::is_same<long, decltype(std::to_integer<long>(b1))>::value, "" );
|
||||
static_assert(std::is_same<unsigned short, decltype(std::to_integer<unsigned short>(b1))>::value, "" );
|
||||
|
||||
static_assert(std::to_integer<int>(b1) == 1, "");
|
||||
static_assert(std::to_integer<int>(b3) == 3, "");
|
||||
static_assert(std::to_integer<int>(b1) == 1, "");
|
||||
static_assert(std::to_integer<int>(b3) == 3, "");
|
||||
}
|
||||
|
||||
@@ -16,24 +16,24 @@
|
||||
|
||||
|
||||
constexpr std::byte test(std::byte b1, std::byte b2) {
|
||||
std::byte bret = b1;
|
||||
return bret ^= b2;
|
||||
}
|
||||
std::byte bret = b1;
|
||||
return bret ^= b2;
|
||||
}
|
||||
|
||||
|
||||
int main () {
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
std::byte b; // not constexpr, just used in noexcept check
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
|
||||
static_assert(noexcept(b ^= b), "" );
|
||||
static_assert(noexcept(b ^= b), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(test(b1, b8)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b9)) == 8, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b9)) == 1, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b8)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b1, b9)) == 8, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b9)) == 1, "");
|
||||
|
||||
static_assert(std::to_integer<int>(test(b8, b1)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b1)) == 8, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b8)) == 1, "");
|
||||
static_assert(std::to_integer<int>(test(b8, b1)) == 9, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b1)) == 8, "");
|
||||
static_assert(std::to_integer<int>(test(b9, b8)) == 1, "");
|
||||
}
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
// constexpr byte operator^(byte l, byte r) noexcept;
|
||||
|
||||
int main () {
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
constexpr std::byte b1{static_cast<std::byte>(1)};
|
||||
constexpr std::byte b8{static_cast<std::byte>(8)};
|
||||
constexpr std::byte b9{static_cast<std::byte>(9)};
|
||||
|
||||
static_assert(noexcept(b1 ^ b8), "" );
|
||||
static_assert(noexcept(b1 ^ b8), "" );
|
||||
|
||||
static_assert(std::to_integer<int>(b1 ^ b8) == 9, "");
|
||||
static_assert(std::to_integer<int>(b1 ^ b9) == 8, "");
|
||||
static_assert(std::to_integer<int>(b8 ^ b9) == 1, "");
|
||||
static_assert(std::to_integer<int>(b1 ^ b8) == 9, "");
|
||||
static_assert(std::to_integer<int>(b1 ^ b9) == 8, "");
|
||||
static_assert(std::to_integer<int>(b8 ^ b9) == 1, "");
|
||||
|
||||
static_assert(std::to_integer<int>(b8 ^ b1) == 9, "");
|
||||
static_assert(std::to_integer<int>(b9 ^ b1) == 8, "");
|
||||
static_assert(std::to_integer<int>(b9 ^ b8) == 1, "");
|
||||
static_assert(std::to_integer<int>(b8 ^ b1) == 9, "");
|
||||
static_assert(std::to_integer<int>(b9 ^ b1) == 8, "");
|
||||
static_assert(std::to_integer<int>(b9 ^ b8) == 1, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user