test: Mark 316 tests as XFAIL to rename to xfail.pass.cpp.

This commit is contained in:
NAKAMURA Takumi
2011-04-20 16:59:33 +09:00
parent d3665e1d9d
commit cb430f3a47
316 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
//===----------------------------------------------------------------------===//
//
// 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_fstream
// void open(const string& s, ios_base::openmode mode = ios_base::in|ios_base::out);
#include <fstream>
#include <cassert>
int main()
{
{
std::fstream fs;
assert(!fs.is_open());
fs.open(std::string("test.dat"), std::ios_base::in | std::ios_base::out
| std::ios_base::trunc);
assert(fs.is_open());
double x = 0;
fs << 3.25;
fs.seekg(0);
fs >> x;
assert(x == 3.25);
}
std::remove("test.dat");
{
std::wfstream fs;
assert(!fs.is_open());
fs.open(std::string("test.dat"), std::ios_base::in | std::ios_base::out
| std::ios_base::trunc);
assert(fs.is_open());
double x = 0;
fs << 3.25;
fs.seekg(0);
fs >> x;
assert(x == 3.25);
}
std::remove("test.dat");
}