[libcxx-commits] [PATCH] D90602: [libcxx] [test] Use error_code::default_error_condition to check errors against the expected codes
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Nov 2 16:05:47 PST 2020
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM with my comments applied.
================
Comment at: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp:176
+ if (expected_ec)
+ TEST_CHECK(ErrorIs(ec, (std::errc)expected_ec.value()));
+ else
----------------
Can you please use `static_cast` instead of a C-style cast?
================
Comment at: libcxx/test/support/filesystem_test_helper.h:565
for (auto errc : errors) {
- if (ec == std::make_error_code(errc))
+ if (cond.value() == (int)errc)
return true;
----------------
Same, `static_cast`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90602/new/
https://reviews.llvm.org/D90602
More information about the libcxx-commits
mailing list