Convert the expected result path to preferred separators, add exceptions
to the test results where needed (due to some cases being interpreted
as a root name).
Details
- Reviewers
• Quuxplusone curdeius - Group Reviewers
Restricted Project - Commits
- rGd601edf0b053: [libcxx] [test] Fix lexically_normal and lexically_relative_and_proximate for…
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp | ||
---|---|---|
42 | Unless I am mistaken, the test case for //base is identical for Win32 and other platforms. |
libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp | ||
---|---|---|
42 | Thanks, looks like you're right. Updating... |
LGTM!
libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp | ||
---|---|---|
89 | Potential drive-by clarity improvement: Here we construct proximate_expected from the old value of output, rather than from expect. This works, because by the time we reach this line, it is guaranteed that PathEq(output, expect). Still, IMHO, this code would be less confusing if you replaced the identifier output on this line with the identifier expect. Plus, fix the argument order to PathEq so that it's parallel to the order on line 81. const fs::path proximate_expect = expect.empty() ? p : expect; if (!PathEq(proximate_output, proximate_expect)) ~~~ Not a blocker, but I think it'd be nice. |
libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp | ||
---|---|---|
89 | Sure, I can do a separate change to improve the consistency that way. |
Unless I am mistaken, the test case for //base is identical for Win32 and other platforms.