From fdbd1493b9c85c8c7c90b335ffeda04f3ee45e28 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Mon, 19 Jul 2004 06:50:22 +0000 Subject: [PATCH] Simplify the test. [SVN r23759] --- test/winmain.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/test/winmain.cpp b/test/winmain.cpp index f178552..3acb6fb 100644 --- a/test/winmain.cpp +++ b/test/winmain.cpp @@ -14,12 +14,6 @@ using namespace boost::program_options; #include #include -template -unsigned size(const T (&t)[N]) -{ - return N; -} - void test_winmain() { using namespace std; @@ -28,7 +22,8 @@ void test_winmain() #define TEST(input, expected) \ char* BOOST_PP_CAT(e, __LINE__)[] = expected;\ vector BOOST_PP_CAT(v, __LINE__) = split_winmain(input);\ - BOOST_REQUIRE(BOOST_PP_CAT(v, __LINE__).size() == size(BOOST_PP_CAT(e, __LINE__)));\ + BOOST_REQUIRE(BOOST_PP_CAT(v, __LINE__).size() == \ + sizeof(BOOST_PP_CAT(e, __LINE__))/sizeof(char*));\ BOOST_CHECK_EQUAL_COLLECTIONS(BOOST_PP_CAT(v, __LINE__).begin(),\ BOOST_PP_CAT(v, __LINE__).end(),\ BOOST_PP_CAT(e, __LINE__));