[libcxx-commits] [PATCH] D98127: [libcxx] [test] Clarify and improve consistency in lexically_relative_and_proximate.pass.cpp. NFC.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Mar 6 15:17:30 PST 2021


Quuxplusone added inline comments.


================
Comment at: libcxx/test/std/input.output/filesystems/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp:90
+    if (!PathEq(proximate_output, proximate_expected))
       ReportErr("path::lexically_proximate", proximate_output, proximate_expected);
   }
----------------
Please name the variable `proximate_expect` instead of `proximate_expected`; or else name the variable and field above `expected` instead of `expect`. But they should be consistent with each other, one way or another.

I had suggested using `expect.empty()` instead of `expect.native().empty()`, on the assumption that they do the same thing. I just checked the code in `<filesystem>` to be sure, and yeah, it sure //looks// like they do the same thing. Can //you// think of any reason the original programmer might have used `expect.native().empty()` here instead of the more natural `expect.empty()`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98127/new/

https://reviews.llvm.org/D98127



More information about the libcxx-commits mailing list