This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Fix all remaining issues with fs::path::string_type being wstring
ClosedPublic

Authored by mstorsjo on Oct 19 2020, 2:42 AM.

Details

Summary

Use fs::path as variable type instead of std::string, when the input potentially is a path, as they can't be implicitly converted back to string.

Diff Detail

Event Timeline

mstorsjo created this revision.Oct 19 2020, 2:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2020, 2:42 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
mstorsjo requested review of this revision.Oct 19 2020, 2:42 AM
ldionne accepted this revision.Oct 19 2020, 5:40 AM
ldionne added a subscriber: ldionne.

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

libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
28–29

This could be in filesystem_test_helper (I proposed adding such a helper in another patch in this series).

This revision is now accepted and ready to land.Oct 19 2020, 5:40 AM

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

Sure, that sounds like a good idea, but I'd rather do that in a separate patch (superseding the one you commented on) and keeping this one as such (as a pure path/string handling fix).

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

Sure, that sounds like a good idea, but I'd rather do that in a separate patch (superseding the one you commented on) and keeping this one as such (as a pure path/string handling fix).

Sounds good -- can you open the patch now? I want to make sure we don't accidentally forget to cleanup afterwards :-)