[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:
Stephan T. Lavavej
2017-07-29 00:55:10 +00:00
parent 62e519c2f9
commit a686caad20
121 changed files with 786 additions and 786 deletions

View File

@@ -18,13 +18,13 @@
#include <cassert>
struct Tag {
Tag() : val(0), tag("Default") {}
Tag(int a, const char *b) : val(a), tag(b) {}
~Tag() {}
Tag() : val(0), tag("Default") {}
Tag(int a, const char *b) : val(a), tag(b) {}
~Tag() {}
int val;
const char *tag;
};
int val;
const char *tag;
};
bool eq(const Tag& rhs, const Tag& lhs) { return rhs.val == lhs.val && rhs.tag == lhs.tag; }
// bool operator==(const Tag& rhs, const Tag& lhs) { return rhs.val == lhs.val; }

View File

@@ -23,24 +23,24 @@
#if TEST_STD_VER >= 11
struct S {
S() : i_(0) {}
S(int i) : i_(i) {}
S() : i_(0) {}
S(int i) : i_(i) {}
S(const S& rhs) : i_(rhs.i_) {}
S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; }
S(const S& rhs) : i_(rhs.i_) {}
S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; }
S& operator =(const S& rhs) { i_ = rhs.i_; return *this; }
S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; }
S& operator =(int i) { i_ = i; return *this; }
S& operator =(const S& rhs) { i_ = rhs.i_; return *this; }
S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; }
S& operator =(int i) { i_ = i; return *this; }
bool operator <(const S& rhs) const { return i_ < rhs.i_; }
bool operator ==(const S& rhs) const { return i_ == rhs.i_; }
bool operator ==(int i) const { return i_ == i; }
bool operator <(const S& rhs) const { return i_ < rhs.i_; }
bool operator ==(const S& rhs) const { return i_ == rhs.i_; }
bool operator ==(int i) const { return i_ == i; }
void set(int i) { i_ = i; }
void set(int i) { i_ = i; }
int i_;
};
int i_;
};
#endif
std::mt19937 randomness;

View File

@@ -33,25 +33,25 @@ struct indirect_less
};
struct S {
S() : i_(0) {}
S(int i) : i_(i) {}
S() : i_(0) {}
S(int i) : i_(i) {}
S(const S& rhs) : i_(rhs.i_) {}
S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; }
S(const S& rhs) : i_(rhs.i_) {}
S( S&& rhs) : i_(rhs.i_) { rhs.i_ = -1; }
S& operator =(const S& rhs) { i_ = rhs.i_; return *this; }
S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; }
S& operator =(int i) { i_ = i; return *this; }
S& operator =(const S& rhs) { i_ = rhs.i_; return *this; }
S& operator =( S&& rhs) { i_ = rhs.i_; rhs.i_ = -2; assert(this != &rhs); return *this; }
S& operator =(int i) { i_ = i; return *this; }
bool operator <(const S& rhs) const { return i_ < rhs.i_; }
bool operator >(const S& rhs) const { return i_ > rhs.i_; }
bool operator ==(const S& rhs) const { return i_ == rhs.i_; }
bool operator ==(int i) const { return i_ == i; }
bool operator <(const S& rhs) const { return i_ < rhs.i_; }
bool operator >(const S& rhs) const { return i_ > rhs.i_; }
bool operator ==(const S& rhs) const { return i_ == rhs.i_; }
bool operator ==(int i) const { return i_ == i; }
void set(int i) { i_ = i; }
void set(int i) { i_ = i; }
int i_;
};
int i_;
};
#endif // TEST_STD_VER >= 11

View File

@@ -87,8 +87,8 @@ struct less { constexpr bool operator ()( const int &x, const int &y) const { re
void constexpr_test()
{
#if TEST_STD_VER >= 14
constexpr auto p = std::min_element(il, il+8, less());
static_assert(*p == 1, "");
constexpr auto p = std::min_element(il, il+8, less());
static_assert(*p == 1, "");
#endif
}