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 --- 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 @@ // [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; }