diff --git a/tests/proxy_view_tests.cpp b/tests/proxy_view_tests.cpp index 0673b65..38999d1 100644 --- a/tests/proxy_view_tests.cpp +++ b/tests/proxy_view_tests.cpp @@ -9,7 +9,7 @@ namespace proxy_view_tests_details { struct TestFacade : pro::facade_builder ::add_convention, void(int)> - ::add_convention + ::add_convention ::add_view ::add_view ::build {}; @@ -32,8 +32,8 @@ static_assert(sizeof(pro::proxy) == 3 * sizeof(void*)); static_assert(std::is_trivially_copy_constructible_v>); static_assert(std::is_trivially_destructible_v>); static_assert(SupportsIntPlusEqual>())>); -static_assert(!SupportsToString>())>); -static_assert(sizeof(pro::proxy_view) == 2 * sizeof(void*)); +static_assert(SupportsToString>())>); +static_assert(sizeof(pro::proxy_view) == 3 * sizeof(void*)); static_assert(std::is_trivially_copy_constructible_v>); static_assert(std::is_trivially_destructible_v>); @@ -55,6 +55,7 @@ TEST(ProxyViewTests, TestViewIndependentUse) { int a = 123; pro::proxy_view p = &a; *p += 3; + ASSERT_EQ(ToString(*p), "126"); ASSERT_EQ(a, 126); } @@ -78,6 +79,7 @@ TEST(ProxyViewTests, TestViewOfNonOwning) { *p2 += 3; ASSERT_EQ(ToString(*p1), "126"); p1.reset(); + ASSERT_EQ(ToString(*p2), "126"); ASSERT_EQ(a, 126); }