[libcxx-commits] [PATCH] D89948: [libcxx] [test] Ifdef out uses of create_fifo on windows

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 19 13:25:43 PST 2021


ldionne requested changes to this revision.
ldionne added inline comments.
This revision now requires changes to proceed.


================
Comment at: libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp:94
 
-  for (auto p : {dir2, fifo, sym_to_fifo}) {
+  for (auto p : {
+    dir2,
----------------
As a general pattern, could we instead refactor the body of the loop (which contains the actual tests) into a lambda, and then call it with the appropriate inputs? I think that might make the `#ifdefs` less awkward. WDYT?

I don't think it makes sense to do that everywhere, but I think it might here.


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

https://reviews.llvm.org/D89948



More information about the libcxx-commits mailing list