From 414728970aed033c784112ed5b509fe6a372215b Mon Sep 17 00:00:00 2001 From: Andrzej Krzemienski Date: Wed, 17 Feb 2016 16:26:47 +0100 Subject: [PATCH] fixed optional refs test. I was using default values for function teplate parameters, wchich does not compile in C++03. --- test/optional_test_ref_portable_minimum.cpp | 31 +++++++++++---------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/test/optional_test_ref_portable_minimum.cpp b/test/optional_test_ref_portable_minimum.cpp index a923804..5bd7d11 100644 --- a/test/optional_test_ref_portable_minimum.cpp +++ b/test/optional_test_ref_portable_minimum.cpp @@ -199,11 +199,11 @@ void test_direct_init_for() BOOST_TEST_EQ(val(v), 7); } -template +template void test_clearing_the_value() { typename concrete_type_of::type v(2); - optional o1(v), o2(v); + optional o1(v), o2(v); BOOST_TEST(o1); BOOST_TEST(o1 != none); @@ -220,11 +220,11 @@ void test_clearing_the_value() BOOST_TEST_EQ(val(v), 2); } -template +template void test_equality() { typename concrete_type_of::type v1(1), v2(2), v2_(2), v3(3); - optional o1(v1), o2(v2), o2_(v2_), o3(v3), o3_(v3), oN, oN_; + optional o1(v1), o2(v2), o2_(v2_), o3(v3), o3_(v3), oN, oN_; // o2 and o2_ point to different objects; o3 and o3_ point to the same object BOOST_TEST(oN == oN); @@ -256,7 +256,7 @@ void test_equality() BOOST_TEST( (o2 != oN)); } -template +template void test_order() { typename concrete_type_of::type v1(1), v2(2), v2_(2), v3(3); @@ -399,7 +399,7 @@ void test_order() BOOST_TEST(!(o3_ < oN_)); } -template +template void test_swap() { typename concrete_type_of::type v1(1), v2(2); @@ -435,11 +435,11 @@ void test_optional_ref() { test_not_containing_value_for(); test_direct_init_for(); - test_clearing_the_value(); + test_clearing_the_value(); test_arrow(); - test_equality(); - test_order(); - test_swap(); + test_equality(); + test_order(); + test_swap(); } template @@ -448,12 +448,15 @@ void test_optional_const_ref() test_not_containing_value_for(); test_direct_init_for_const(); test_direct_init_for_noconst_const(); - test_clearing_the_value(); + test_clearing_the_value(); + test_clearing_the_value(); test_arrow_const(); test_arrow_noconst_const(); - test_equality(); - test_order(); - test_swap(); + test_equality(); + test_equality(); + test_order(); + test_order(); + test_swap(); test_swap(); }