+2019-04-30 Jonathan Wakely <jwakely@redhat.com>
+
+ * testsuite/27_io/filesystem/path/decompose/root_path.cc: Remove
+ macros accidentally left in.
+ * testsuite/27_io/filesystem/path/native/string-char8_t.cc: Remove
+ unnecessary -lstdc++fs option. Fix test for mingw.
+ * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
+ Fix test for mingw.
+
2019-04-30 Jakub Jelinek <jakub@redhat.com>
* config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
VERIFY( p2.root_path() == path("/") );
}
-#undef VERIFY
-#define VERIFY(X) do { if (!(X)) { __builtin_puts("FAIL: " #X); } } while(false)
-#define DUMP(X, Y, Z) do { if (!(Y == Z)) { __builtin_printf("%s %s %s\n", X.c_str(), Y.c_str(), Z.c_str()); } } while(false)
-
void
test02()
{
path rootn = p.root_name();
path rootd = p.root_directory();
VERIFY( rootp == (rootn / rootd) );
- DUMP(p, rootp , (rootn / rootd) );
}
}
// with this library; see the file COPYING3. If not see
// <http://www.gnu.org/licenses/>.
-// { dg-options "-std=gnu++17 -lstdc++fs -fchar8_t" }
+// { dg-options "-std=gnu++17 -fchar8_t" }
// { dg-do run { target c++17 } }
// { dg-require-filesystem-ts "" }
test01()
{
using namespace std::filesystem;
- const std::string s = "abc";
+ using string_type = std::basic_string<path::value_type>;
+ const string_type s{ 'a', 'b', 'c' };
path p(s);
VERIFY( p.native() == s );
VERIFY( p.c_str() == s );
- VERIFY( static_cast<std::string>(p) == s );
+ VERIFY( static_cast<string_type>(p) == s );
- std::string s2 = p; // implicit conversion
+ string_type s2 = p; // implicit conversion
VERIFY( s2 == p.native() );
}
test01()
{
using namespace std::experimental::filesystem;
- const std::string s = "abc";
+ using string_type = std::basic_string<path::value_type>;
+ const string_type s{ 'a', 'b', 'c' };
path p(s);
VERIFY( p.native() == s );
VERIFY( p.c_str() == s );
- VERIFY( static_cast<std::string>(p) == s );
+ VERIFY( static_cast<string_type>(p) == s );
- std::string s2 = p; // implicit conversion
+ string_type s2 = p; // implicit conversion
VERIFY( s2 == p.native() );
}