[libcxx-commits] [PATCH] D89674: [libcxx] [test] Fix all remaining issues with fs::path::string_type being wstring

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 19 05:40:30 PDT 2020


ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
Herald added a subscriber: dexonsmith.

Accepting as long as you extract `PutEnv` into `filesystem_test_helper.h` and use it everywhere in the test suite!



================
Comment at: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp:28
 
-void PutEnv(std::string var, std::string value) {
-    assert(::setenv(var.c_str(), value.c_str(), /* overwrite */ 1) == 0);
+void PutEnv(std::string var, fs::path value) {
+    assert(::setenv(var.c_str(), value.string().c_str(), /* overwrite */ 1) == 0);
----------------
This could be in `filesystem_test_helper` (I proposed adding such a helper in another patch in this series).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D89674



More information about the libcxx-commits mailing list