forked from OSchip/llvm-project
[libc++] [test] Qualify `move` as `std::move` in a lot of tests. NFCI.
We shouldn't be calling `move` via ADL -- and neither should anybody in the wild be calling it via ADL, so it's not like we need to test this ADL ability of `move` in particular. Reviewed as part of D119860.
This commit is contained in:
parent
3f3abaf40a
commit
7853371146
|
@ -30,7 +30,7 @@ int main(int, char**)
|
|||
f.pubseekoff(1, std::ios_base::beg);
|
||||
assert(f.sgetc() == '2');
|
||||
std::filebuf f2;
|
||||
f2 = move(f);
|
||||
f2 = std::move(f);
|
||||
assert(!f.is_open());
|
||||
assert(f2.is_open());
|
||||
assert(f2.sgetc() == '2');
|
||||
|
@ -47,7 +47,7 @@ int main(int, char**)
|
|||
f.pubseekoff(1, std::ios_base::beg);
|
||||
assert(f.sgetc() == L'2');
|
||||
std::wfilebuf f2;
|
||||
f2 = move(f);
|
||||
f2 = std::move(f);
|
||||
assert(!f.is_open());
|
||||
assert(f2.is_open());
|
||||
assert(f2.sgetc() == L'2');
|
||||
|
|
|
@ -25,7 +25,7 @@ int main(int, char**)
|
|||
std::fstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out
|
||||
| std::ios_base::trunc);
|
||||
std::fstream fs;
|
||||
fs = move(fso);
|
||||
fs = std::move(fso);
|
||||
double x = 0;
|
||||
fs << 3.25;
|
||||
fs.seekg(0);
|
||||
|
@ -39,7 +39,7 @@ int main(int, char**)
|
|||
std::wfstream fso(temp.c_str(), std::ios_base::in | std::ios_base::out
|
||||
| std::ios_base::trunc);
|
||||
std::wfstream fs;
|
||||
fs = move(fso);
|
||||
fs = std::move(fso);
|
||||
double x = 0;
|
||||
fs << 3.25;
|
||||
fs.seekg(0);
|
||||
|
|
|
@ -25,7 +25,7 @@ int main(int, char**)
|
|||
{
|
||||
std::ifstream fso("test.dat");
|
||||
std::ifstream fs;
|
||||
fs = move(fso);
|
||||
fs = std::move(fso);
|
||||
double x = 0;
|
||||
fs >> x;
|
||||
assert(x == 3.25);
|
||||
|
@ -34,7 +34,7 @@ int main(int, char**)
|
|||
{
|
||||
std::wifstream fso("test.dat");
|
||||
std::wifstream fs;
|
||||
fs = move(fso);
|
||||
fs = std::move(fso);
|
||||
double x = 0;
|
||||
fs >> x;
|
||||
assert(x == 3.25);
|
||||
|
|
|
@ -24,7 +24,7 @@ int main(int, char**)
|
|||
{
|
||||
std::ofstream fso(temp.c_str());
|
||||
std::ofstream fs;
|
||||
fs = move(fso);
|
||||
fs = std::move(fso);
|
||||
fs << 3.25;
|
||||
}
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ int main(int, char**)
|
|||
{
|
||||
std::wofstream fso(temp.c_str());
|
||||
std::wofstream fs;
|
||||
fs = move(fso);
|
||||
fs = std::move(fso);
|
||||
fs << 3.25;
|
||||
}
|
||||
{
|
||||
|
|
|
@ -23,38 +23,38 @@ int main(int, char**)
|
|||
{
|
||||
std::stringbuf buf1("testing");
|
||||
std::stringbuf buf;
|
||||
buf = move(buf1);
|
||||
buf = std::move(buf1);
|
||||
assert(buf.str() == "testing");
|
||||
}
|
||||
{
|
||||
std::stringbuf buf1("testing", std::ios_base::in);
|
||||
std::stringbuf buf;
|
||||
buf = move(buf1);
|
||||
buf = std::move(buf1);
|
||||
assert(buf.str() == "testing");
|
||||
}
|
||||
{
|
||||
std::stringbuf buf1("testing", std::ios_base::out);
|
||||
std::stringbuf buf;
|
||||
buf = move(buf1);
|
||||
buf = std::move(buf1);
|
||||
assert(buf.str() == "testing");
|
||||
}
|
||||
#ifndef TEST_HAS_NO_WIDE_CHARACTERS
|
||||
{
|
||||
std::wstringbuf buf1(L"testing");
|
||||
std::wstringbuf buf;
|
||||
buf = move(buf1);
|
||||
buf = std::move(buf1);
|
||||
assert(buf.str() == L"testing");
|
||||
}
|
||||
{
|
||||
std::wstringbuf buf1(L"testing", std::ios_base::in);
|
||||
std::wstringbuf buf;
|
||||
buf = move(buf1);
|
||||
buf = std::move(buf1);
|
||||
assert(buf.str() == L"testing");
|
||||
}
|
||||
{
|
||||
std::wstringbuf buf1(L"testing", std::ios_base::out);
|
||||
std::wstringbuf buf;
|
||||
buf = move(buf1);
|
||||
buf = std::move(buf1);
|
||||
assert(buf.str() == L"testing");
|
||||
}
|
||||
#endif // TEST_HAS_NO_WIDE_CHARACTERS
|
||||
|
|
|
@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(typename S::value_type lhs, const S& rhs, const
|
|||
#if TEST_STD_VER >= 11
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test1(typename S::value_type lhs, S&& rhs, const S& x) {
|
||||
assert(lhs + move(rhs) == x);
|
||||
assert(lhs + std::move(rhs) == x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(const typename S::value_type* lhs, const S& rhs,
|
|||
#if TEST_STD_VER >= 11
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test1(const typename S::value_type* lhs, S&& rhs, const S& x) {
|
||||
assert(lhs + move(rhs) == x);
|
||||
assert(lhs + std::move(rhs) == x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(const S& lhs, typename S::value_type rhs, const
|
|||
#if TEST_STD_VER >= 11
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test1(S&& lhs, typename S::value_type rhs, const S& x) {
|
||||
assert(move(lhs) + rhs == x);
|
||||
assert(std::move(lhs) + rhs == x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const typename S::value_type* rhs,
|
|||
#if TEST_STD_VER >= 11
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const typename S::value_type* rhs, const S& x) {
|
||||
assert(move(lhs) + rhs == x);
|
||||
assert(std::move(lhs) + rhs == x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -43,17 +43,17 @@ TEST_CONSTEXPR_CXX20 void test0(const S& lhs, const S& rhs, const S& x) {
|
|||
#if TEST_STD_VER >= 11
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test1(S&& lhs, const S& rhs, const S& x) {
|
||||
assert(move(lhs) + rhs == x);
|
||||
assert(std::move(lhs) + rhs == x);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test2(const S& lhs, S&& rhs, const S& x) {
|
||||
assert(lhs + move(rhs) == x);
|
||||
assert(lhs + std::move(rhs) == x);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void test3(S&& lhs, S&& rhs, const S& x) {
|
||||
assert(move(lhs) + move(rhs) == x);
|
||||
assert(std::move(lhs) + std::move(rhs) == x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue