This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Remove nonportable that errc::is_a_directory produces "Is a directory" from ios_base::failure tests
ClosedPublic

Authored by BillyONeal on Apr 16 2018, 8:38 PM.

Details

Summary

Remove nonportable assumption in io_error tests that std::errc::is_a_directory has message "Is a directory". On MSVC++ it reports "is a directory" (with a lowercase I).

Diff Detail

Event Timeline

BillyONeal created this revision.

Added missing <system_error> include in one of the tests.

I'm fine with this change, but I'm wondering:

  • if there are similar tests in the filesystem test suite, and you haven't tripped over them because you spelled your error message the same as we did.
  • Should part of this test be moved into test/libcxx
  • if there are similar tests in the filesystem test suite, and you haven't tripped over them because you spelled your error message the same as we did.

Almost certainly. But we aren't running your filesystem tests yet because they are still under experimental. There are probably a lot of POSIX assumptions everywhere in there given the root_name parsing business.

  • Should part of this test be moved into test/libcxx

That one's up to you. I don't think the specific message matters to this test; clearly the existing asserts for io_errc::stream don't care about a specific message (which is why they worked on our implementation).

mclow.lists accepted this revision.Apr 24 2018, 8:52 AM
This revision is now accepted and ready to land.Apr 24 2018, 8:52 AM
BillyONeal closed this revision.Apr 24 2018, 7:02 PM

D:\msvc\src\qa\VC\Libs\libcxx\upstream>git svn dcommit
Committing to https://llvm.org/svn/llvm-project/libcxx/trunk ...
Authentication realm: https://llvm.org:443 LLVM Subversion repository
Password for 'bion':

M       test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
M       test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp

Committed r330791

M       test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
M       test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp

r330791 = efac6e5df9109748822bd3b5b533b35257a110f4 (refs/remotes/llvm/master)
No changes between e69aef2e1f9cb3ad085a9ddcc2f432f8f7c8c182 and refs/remotes/llvm/master
Resetting to the latest refs/remotes/llvm/master