Compile failure in C++ tests/ClientSessionTest.cpp at rev 702675
----------------------------------------------------------------

                 Key: QPID-1333
                 URL: https://issues.apache.org/jira/browse/QPID-1333
             Project: Qpid
          Issue Type: Bug
          Components: C++ Client
         Environment: RHEL 4, Boost 1.35
            Reporter: Steve Huston


At svn rev 702675 the C++ test qpid/cpp/src/tests/ClientSessionTest.cpp failed 
compile with:

ClientSessionTest.cpp:165: error: expected constructor, destructor, or type 
conversion before '(' token
ClientSessionTest.cpp:186: error: expected constructor, destructor, or type 
conversion before '(' token

The noted lines both contain QPID_AUTO_TEST_CASE_EXPECTED_FAILURES

I thought this may have been a mis-coded BOOST macro in unit_test.h, and 
changed:

@@ -76,7 +76,7 @@
 #endif

 #ifndef QPID_AUTO_TEST_CASE_EXPECTED_FAILURES
-# define QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n)  
BOOST_AUTO_TEST_SUITE_EXPECTED_FAILURES(name,n)
+# define QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n)  
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n)
 #endif

but that moved the error down a line to:

ClientSessionTest.cpp:166: error: expected unqualified-id before '{' token
ClientSessionTest.cpp:187: error: expected unqualified-id before '{' token

So I extended the work-around section for QPID_AUTO_TEST_CASE_EXPECTED_FAILURES 
to :

--- unit_test.h (revision 702976)
+++ unit_test.h (working copy)
@@ -53,7 +53,7 @@

 // Workaround for BOOST_AUTO_TEST_SUITE_EXPECTED_FAILURES
 //
-#if (BOOST_VERSION < 103500)
+#if (BOOST_VERSION < 103600)

That got things compiling, but I'm not sure this is correct...
The diff I have here now (all together) is:

Index: unit_test.h
===================================================================
--- unit_test.h (revision 702976)
+++ unit_test.h (working copy)
@@ -53,7 +53,7 @@

 // Workaround for BOOST_AUTO_TEST_SUITE_EXPECTED_FAILURES
 //
-#if (BOOST_VERSION < 103500)
+#if (BOOST_VERSION < 103600)

 // Keep the test function for compilation but do not not register it.
 // TODO aconway 2008-04-23: better workaround for expected failures.
@@ -76,7 +76,7 @@
 #endif

 #ifndef QPID_AUTO_TEST_CASE_EXPECTED_FAILURES
-# define QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n)  
BOOST_AUTO_TEST_SUITE_EXPECTED_FAILURES(name,n)
+# define QPID_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n)  
BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES(name,n)
 #endif

 #ifndef QPID_AUTO_TEST_SUITE_END


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to