[libcxx-commits] [libcxx] 4d571cf - [libcxx] [test] Clarify and improve consistency in lexically_relative_and_proximate.pass.cpp. NFC.
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Mar 7 13:31:52 PST 2021
Author: Martin Storsjö
Date: 2021-03-07T23:15:05+02:00
New Revision: 4d571cf4e99e3a7abe898dbbc02b2e872e9490e8
URL: https://github.com/llvm/llvm-project/commit/4d571cf4e99e3a7abe898dbbc02b2e872e9490e8
DIFF: https://github.com/llvm/llvm-project/commit/4d571cf4e99e3a7abe898dbbc02b2e872e9490e8.diff
LOG: [libcxx] [test] Clarify and improve consistency in lexically_relative_and_proximate.pass.cpp. NFC.
Use "expect" instead of "output" for generating "proximate_expected",
pass the arguments to PathEq in the same order as above, rename the
"proximate_expected" variable to be consistent with the naming of the
earlier "expect", use .empty() instead of .native().empty().
Differential Revision: https://reviews.llvm.org/D98127
Added:
Modified:
libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
index 576055763ea0..127cc7f6dcc0 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp
@@ -84,10 +84,9 @@ int main(int, char**) {
// [path.gen] lexically_proximate
// Returns: If the value of lexically_relative(base) is not an empty path,
// return it. Otherwise return *this.
- const fs::path proximate_expected = output.native().empty() ? p
- : output;
- if (!PathEq(proximate_expected, proximate_output))
- ReportErr("path::lexically_proximate", proximate_output, proximate_expected);
+ const fs::path proximate_expect = expect.empty() ? p : expect;
+ if (!PathEq(proximate_output, proximate_expect))
+ ReportErr("path::lexically_proximate", proximate_output, proximate_expect);
}
return Failed;
}
More information about the libcxx-commits
mailing list