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
你有没有试过这样做(从乌龟介绍),而不是你的宏,包括? '#define BOOST_AUTO_TEST_MAIN #include #include ' –
biocomp
@biocomp,它不会改变任何东西,谢谢尝试。 – Eran
它适用于g ++ 4.8.1,turtle 1.2.4和boost 1.54.0。您使用哪种版本的增强版? – llonesmiz