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

2018-04-24 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal closed this revision.
BillyONeal added a comment.

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


https://reviews.llvm.org/D45715



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2018-04-23 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal added a comment.

In https://reviews.llvm.org/D45715#1075665, @mclow.lists wrote:

> - 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.

In https://reviews.llvm.org/D45715#1075665, @mclow.lists wrote:

> - 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).


https://reviews.llvm.org/D45715



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2018-04-23 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment.

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


https://reviews.llvm.org/D45715



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2018-04-16 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal updated this revision to Diff 142733.
BillyONeal added a comment.

Added missing  include in one of the tests.


https://reviews.llvm.org/D45715

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


Index: 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
===
--- 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
+++ 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 int main()
@@ -28,7 +29,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+
assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");
Index: 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
===
--- 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
+++ 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 int main()
@@ -25,7 +26,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+
assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");


Index: test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
===
--- test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
+++ test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 int main()
@@ -28,7 +29,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");
Index: test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
===
--- test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
+++ test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 int main()
@@ -25,7 +26,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


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

2018-04-16 Thread Billy Robert O'Neal III via Phabricator via cfe-commits
BillyONeal created this revision.
BillyONeal added reviewers: mclow.lists, EricWF.

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).


https://reviews.llvm.org/D45715

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


Index: 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
===
--- 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
+++ 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
@@ -28,7 +28,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+
assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");
Index: 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
===
--- 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
+++ 
test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 int main()
@@ -25,7 +26,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+
assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");


Index: test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
===
--- test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
+++ test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_string_error_code.pass.cpp
@@ -28,7 +28,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");
Index: test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
===
--- test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
+++ test/std/input.output/iostreams.base/ios.base/ios.types/ios_failure/ctor_char_pointer_error_code.pass.cpp
@@ -15,6 +15,7 @@
 
 #include 
 #include 
+#include 
 #include 
 
 int main()
@@ -25,7 +26,8 @@
 assert(se.code() == std::make_error_code(std::errc::is_a_directory));
 std::string what_message(se.what());
 assert(what_message.find(what_arg) != std::string::npos);
-assert(what_message.find("Is a directory") != std::string::npos);
+assert(what_message.find(std::generic_category().message(static_cast
+(std::errc::is_a_directory))) != std::string::npos);
 }
 {
 std::string what_arg("io test message");
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits