diff --git a/tests/NewParseTest.cpp b/tests/NewParseTest.cpp index 6f48242ab..de110d54a 100644 --- a/tests/NewParseTest.cpp +++ b/tests/NewParseTest.cpp @@ -279,6 +279,8 @@ template class objWrapper { X val_; }; +// I think there is a bug with the is_assignable in visual studio 2015 it is fixed in later versions +// so this test will not compile in that compiler #if !defined(_MSC_VER) || _MSC_VER >= 1910 static_assert(CLI::detail::is_direct_constructible, std::string>::value, @@ -296,14 +298,11 @@ TEST_F(TApp, stringWrapper) { EXPECT_EQ(sWrapper.value(), "string test"); } -#endif - static_assert(CLI::detail::is_direct_constructible, double>::value, "double wrapper isn't properly assignable"); -#if !defined(_MSC_VER) || _MSC_VER >= 1910 + static_assert(!CLI::detail::is_direct_constructible, int>::value, "double wrapper can be assigned from int"); -#endif static_assert(!CLI::detail::is_istreamable>::value, "double wrapper is input streamable and it shouldn't be"); @@ -325,11 +324,9 @@ TEST_F(TApp, doubleWrapper) { static_assert(CLI::detail::is_direct_constructible, int>::value, "int wrapper is not constructible from int64"); -// Visual 2015 has some issues with this about converting constructors in this context -#if !defined(_MSC_VER) || _MSC_VER >= 1910 static_assert(!CLI::detail::is_direct_constructible, double>::value, "int wrapper is constructible from double"); -#endif + static_assert(!CLI::detail::is_istreamable>::value, "int wrapper is input streamable and it shouldn't be"); @@ -345,7 +342,7 @@ TEST_F(TApp, intWrapper) { EXPECT_THROW(run(), CLI::ConversionError); } -#if !defined(_MSC_VER) || _MSC_VER >= 1910 + static_assert(!CLI::detail::is_direct_constructible, int>::value, "float wrapper is constructible from int"); static_assert(!CLI::detail::is_direct_constructible, double>::value, @@ -354,8 +351,6 @@ static_assert(!CLI::detail::is_direct_constructible, double>:: static_assert(!CLI::detail::is_istreamable>::value, "float wrapper is input streamable and it shouldn't be"); -// I think there is a bug with the is_assignable in visual studio 2015 it is fixed in later versions -// so this test will not compile in that compiler TEST_F(TApp, floatWrapper) { objWrapper iWrapper; app.add_option, float>("-v", iWrapper);