diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-15 17:11:27 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-05-31 18:42:55 +0300 |
commit | 61ef82ec2b2ca396667f92a4e5c6ceb729c42086 (patch) | |
tree | 57ca5868483f361a9da28bbfc32f0cc838787b3e /tests/path/driver.cxx | |
parent | 79bb0331cb93a736193e733b5ae26d040931a1aa (diff) |
Port to MinGW
Diffstat (limited to 'tests/path/driver.cxx')
-rw-r--r-- | tests/path/driver.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tests/path/driver.cxx b/tests/path/driver.cxx index 4df2a05..de8e8b1 100644 --- a/tests/path/driver.cxx +++ b/tests/path/driver.cxx @@ -15,11 +15,20 @@ using namespace butl; int main () { + // Make sure we have nothrow destructor and move constructor so that + // storage in containers is not pessimized. + // static_assert (is_nothrow_destructible<path>::value, ""); - static_assert (is_nothrow_move_constructible<path>::value, ""); - static_assert (is_nothrow_destructible<dir_path>::value, ""); + + // MINGW GCC 4.9 std::string is not nothrow-move-constructible, so path and + // dir_path (which have a member of std::string type) are not as such as + // well. + // +#if !defined(_WIN32) || !defined(__GNUC__) || __GNUC__ > 4 + static_assert (is_nothrow_move_constructible<path>::value, ""); static_assert (is_nothrow_move_constructible<dir_path>::value, ""); +#endif assert (path ("/").string () == "/"); assert (path ("//").string () == "/"); @@ -174,7 +183,11 @@ main () assert (path (p.begin (), p.end ()) == p); assert (path (++p.begin (), p.end ()) == path ("foo/bar")); assert (path (++(++p.begin ()), p.end ()) == path ("bar")); + +#ifndef _WIN32 assert (path (p.begin (), ++p.begin ()) == path ("/")); +#endif + assert (path (++p.begin (), ++(++p.begin ())) == path ("foo")); assert (path (++(++p.begin ()), ++(++(++p.begin ()))) == path ("bar")); } |