2013-10-13 54 views
1

我想編譯一個簡單的例子在龜(與升壓單元測試框架),並從海龜得到編譯錯誤。龜(模擬框架)編譯錯誤

我假設龜沒有真正的錯誤,這是我做錯了或有不相容的東西。

任何幫助,將不勝感激。


的例子:

#define BOOST_TEST_MAIN 
#define BOOST_TEST_DYN_LINK 

#include <boost/test/unit_test.hpp> 
#include <turtle/mock.hpp> 

BOOST_AUTO_TEST_CASE(trutletest){ 
    BOOST_CHECK(1 == 4); 
} 

**我所以它甚至不使用任何烏龜的功能,只是它包括導致錯誤蒸餾水它。

的錯誤,我得到:

In file included from ../turtle/include/turtle/detail/../matcher.hpp:14, 
       from ../turtle/include/turtle/detail/function.hpp:16, 
       from ../turtle/include/turtle/detail/functor.hpp:12, 
       from ../turtle/include/turtle/reset.hpp:14, 
       from ../turtle/include/turtle/mock.hpp:14, 
       from test.cpp:5: 
../turtle/include/turtle/detail/../detail/is_functor.hpp:22: error: expected constructor, destructor, or type conversion before ‘(’ token 
In file included from ../turtle/include/turtle/detail/function.hpp:16, 
       from ../turtle/include/turtle/detail/functor.hpp:12, 
       from ../turtle/include/turtle/reset.hpp:14, 
       from ../turtle/include/turtle/mock.hpp:14, 
       from test.cpp:5: 
../turtle/include/turtle/detail/../matcher.hpp:87: error: ‘is_functor’ is not a member of ‘mock::detail’ 
../turtle/include/turtle/detail/../matcher.hpp:87: error: ‘is_functor’ is not a member of ‘mock::detail’ 
../turtle/include/turtle/detail/../matcher.hpp:87: error: template argument 1 is invalid 
../turtle/include/turtle/detail/../matcher.hpp:88: error: template argument 3 is invalid 
../turtle/include/turtle/detail/../matcher.hpp:89: error: expected unqualified-id before ‘>’ token 

編譯行: G ++ TEST.CPP -o測試-I ../turtle/include/ -lboost_unit_test_framework

我使用: G ++ (GCC)4.4.6 20120305(Red Hat 4.4.6-4) Turtle 1.2.4

+0

你有沒有試過這樣做(從烏龜介紹),而不是你的宏,包括? '#define BOOST_AUTO_TEST_MAIN #include #include ' – biocomp

+0

@biocomp,它不會改變任何東西,謝謝嘗試。 – Eran

+1

它適用於g ++ 4.8.1,turtle 1.2.4和boost 1.54.0。您使用哪種版本的增強版? – llonesmiz

回答

0

隨着cv_and_he的評論,問題是使用舊的增強版本。
更新到最新的提升(1.54.0)解決了問題。