[PATCH] D26814: [libcxx] [test] Change ifstream constructor tests to handle read-only files.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 13:36:09 PST 2016


STL_MSFT created this revision.
STL_MSFT added reviewers: EricWF, mclow.lists.
STL_MSFT added a subscriber: cfe-commits.
Herald added a subscriber: aemerson.

[libcxx] [test] Change ifstream constructor tests to handle read-only files.

Certain source control systems like to set the read-only bit on their files,
which interferes with opening "test.dat" for both input and output.
Fortunately, we can work around this without losing test coverage.
Now, the ifstream.cons tests harmlessly ignore failures to open files for
input and output simultaneously. The ofstream.cons tests are creating writable
files (not checked into source control), where the ifstream tests will succeed.


https://reviews.llvm.org/D26814

Files:
  test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp
  test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp
  test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp
  test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26814.78413.patch
Type: text/x-patch
Size: 4087 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161117/afa1b90b/attachment-0001.bin>


More information about the cfe-commits mailing list