summaryrefslogtreecommitdiff
path: root/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp')
-rw-r--r--test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp b/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
index 7112b17fb8be..b95db6626020 100644
--- a/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
+++ b/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp
@@ -31,6 +31,12 @@ int main()
fs >> x;
assert(x == 3.25);
}
+ {
+ std::ifstream fs(temp, std::ios_base::out);
+ double x = 0;
+ fs >> x;
+ assert(x == 3.25);
+ }
std::remove(temp.c_str());
{
std::wofstream fs(temp);
@@ -42,5 +48,11 @@ int main()
fs >> x;
assert(x == 3.25);
}
+ {
+ std::wifstream fs(temp, std::ios_base::out);
+ double x = 0;
+ fs >> x;
+ assert(x == 3.25);
+ }
std::remove(temp.c_str());
}