Move test into test/std subdirectory.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224658 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2014-12-20 01:40:03 +00:00
parent 669a8a5a19
commit a90c6dd460
4817 changed files with 13 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <fstream>
// template <class charT, class traits = char_traits<charT> >
// class basic_ifstream
// basic_ifstream();
#include <fstream>
#include <type_traits>
int main()
{
{
std::ifstream fs;
}
{
std::wifstream fs;
}
}

View File

@@ -0,0 +1,38 @@
//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <fstream>
// template <class charT, class traits = char_traits<charT> >
// class basic_ifstream
// basic_ifstream(basic_ifstream&& rhs);
#include <fstream>
#include <cassert>
int main()
{
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
{
std::ifstream fso("test.dat");
std::ifstream fs = move(fso);
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::wifstream fso("test.dat");
std::wifstream fs = move(fso);
double x = 0;
fs >> x;
assert(x == 3.25);
}
#endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES
}

View File

@@ -0,0 +1,46 @@
//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <fstream>
// template <class charT, class traits = char_traits<charT> >
// class basic_ifstream
// explicit basic_ifstream(const char* s, ios_base::openmode mode = ios_base::in);
#include <fstream>
#include <cassert>
int main()
{
{
std::ifstream fs("test.dat");
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::ifstream fs("test.dat", std::ios_base::out);
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::wifstream fs("test.dat");
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::wifstream fs("test.dat", std::ios_base::out);
double x = 0;
fs >> x;
assert(x == 3.25);
}
}

View File

@@ -0,0 +1,46 @@
//===----------------------------------------------------------------------===//
//
// 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.
//
//===----------------------------------------------------------------------===//
// <fstream>
// template <class charT, class traits = char_traits<charT> >
// class basic_ifstream
// explicit basic_ifstream(const string& s, ios_base::openmode mode = ios_base::in);
#include <fstream>
#include <cassert>
int main()
{
{
std::ifstream fs(std::string("test.dat"));
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::ifstream fs(std::string("test.dat"), std::ios_base::out);
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::wifstream fs(std::string("test.dat"));
double x = 0;
fs >> x;
assert(x == 3.25);
}
{
std::wifstream fs(std::string("test.dat"), std::ios_base::out);
double x = 0;
fs >> x;
assert(x == 3.25);
}
}

View File

@@ -0,0 +1 @@
3.25