@@ -441,6 +441,10 @@ TEST_CASE("30.10.8.4.2 path assignments", "[filesystem][path][fs.path.assign]")
441
441
REQUIRE (p1 == p3);
442
442
p3 = fs::path{" /usr/local" };
443
443
REQUIRE (p2 == p3);
444
+ p3 = fs::path{L" /usr/local" };
445
+ REQUIRE (p2 == p3);
446
+ p3.assign (L" /usr/local" );
447
+ REQUIRE (p2 == p3);
444
448
#if defined(IS_WCHAR_PATH) || defined(GHC_USE_WCHAR_T)
445
449
p3 = fs::path::string_type{L" /foo/bar" };
446
450
REQUIRE (p1 == p3);
@@ -499,9 +503,13 @@ TEST_CASE("30.10.8.4.4 path concatenation", "[filesystem][path][fs.path.concat]"
499
503
500
504
CHECK ((fs::path (" foo" ) += " bar" ) == " foobar" );
501
505
CHECK ((fs::path (" foo" ) += " /bar" ) == " foo/bar" );
506
+ CHECK ((fs::path (" foo" ) += L" bar" ) == " foobar" );
507
+ CHECK ((fs::path (" foo" ) += L" /bar" ) == " foo/bar" );
502
508
503
509
CHECK ((fs::path (" foo" ) += ' b' ) == " foob" );
504
510
CHECK ((fs::path (" foo" ) += ' /' ) == " foo/" );
511
+ CHECK ((fs::path (" foo" ) += L' b' ) == " foob" );
512
+ CHECK ((fs::path (" foo" ) += L' /' ) == " foo/" );
505
513
506
514
CHECK ((fs::path (" foo" ) += std::string (" bar" )) == " foobar" );
507
515
CHECK ((fs::path (" foo" ) += std::string (" /bar" )) == " foo/bar" );
@@ -514,6 +522,8 @@ TEST_CASE("30.10.8.4.4 path concatenation", "[filesystem][path][fs.path.concat]"
514
522
515
523
CHECK (fs::path (" foo" ).concat (" bar" ) == " foobar" );
516
524
CHECK (fs::path (" foo" ).concat (" /bar" ) == " foo/bar" );
525
+ CHECK (fs::path (" foo" ).concat (L" bar" ) == " foobar" );
526
+ CHECK (fs::path (" foo" ).concat (L" /bar" ) == " foo/bar" );
517
527
std::string bar = " bar" ;
518
528
CHECK (fs::path (" foo" ).concat (bar.begin (), bar.end ()) == " foobar" );
519
529
#ifndef USE_STD_FS
@@ -2745,14 +2755,10 @@ TEST_CASE("std::string_view support", "[filesystem][fs.string_view]")
2745
2755
#if defined(GHC_HAS_STD_STRING_VIEW)
2746
2756
using namespace std ::literals;
2747
2757
using string_view = std::string_view;
2748
- #if defined(IS_WCHAR_PATH) || defined(GHC_USE_WCHAR_T)
2749
2758
using wstring_view = std::wstring_view;
2750
- #endif
2751
2759
#elif defined(GHC_HAS_STD_EXPERIMENTAL_STRING_VIEW)
2752
2760
using string_view = std::experimental::string_view;
2753
- #if defined(IS_WCHAR_PATH) || defined(GHC_USE_WCHAR_T)
2754
2761
using wstring_view = std::experimental::wstring_view;
2755
- #endif
2756
2762
#endif
2757
2763
2758
2764
{
@@ -2769,7 +2775,6 @@ TEST_CASE("std::string_view support", "[filesystem][fs.string_view]")
2769
2775
p /= string_view (" Appendix" );
2770
2776
CHECK (p == " XYZ/Appendix" );
2771
2777
}
2772
- #if defined(IS_WCHAR_PATH) || defined(GHC_USE_WCHAR_T)
2773
2778
{
2774
2779
std::wstring p (L" foo/bar" );
2775
2780
wstring_view sv (p);
@@ -2779,7 +2784,6 @@ TEST_CASE("std::string_view support", "[filesystem][fs.string_view]")
2779
2784
CHECK (p2 == " foo" );
2780
2785
CHECK (p2.compare (wstring_view (L" foo" )) == 0 );
2781
2786
}
2782
- #endif
2783
2787
2784
2788
#else
2785
2789
WARN (" std::string_view specific tests are empty without std::string_view." );
0 commit comments