I'm trying to set up the turtle-mock library with the boost::test framework.
I don't know how to do it, nothing is said about that neither in the documentation...
I tried to simply copy the library source into boost/include. I also tried to copy the turtle dir into my project and then add a CMake INCLUDE_DIRECTORIES directive pointing to the turtle folder.
I just tried to include turtle...
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <boost/turtle/mock.hpp>
Then I got this error:
In file included from /home/ferdi/boost/include/boost/turtle/detail/function.hpp:97:0,
from /home/ferdi/boost/include/boost/turtle/detail/functor.hpp:13,
from /home/ferdi/boost/include/boost/turtle/reset.hpp:15,
from /home/ferdi/boost/include/boost/turtle/mock.hpp:14,
from /home/ferdi/inesm/test/Test.hpp:7,
from /home/ferdi/inesm/test/lib/inesm/component/note/TestNote.cpp:6:
/home/ferdi/boost/include/boost/preprocessor/iteration/detail/iter/forward1.hpp:52:37: fatal error: turtle/detail/function_iterate.hpp: Aucun fichier ou dossier de ce type
# include BOOST_PP_FILENAME_1
("Aucun fichier ou dossier de ce type" means "No file or directory of this type")
What does that mean ? How could I do ?
Thanks !
From the documentation the typical usage would be
#define BOOST_AUTO_TEST_MAIN
#include <boost/test/auto_unit_test.hpp>
#include <turtle/mock.hpp>
or adjusted to your use case
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include <boost/test/unit_test.hpp>
#include <turtle/mock.hpp>
so without the boost/ when including turtle.
I don't think you should move turtle into boost but rather keep it separate and add a CMake include directory as you were refering to (but to the parent directory of turtle).
If you insist on merging turtle with boost you could try instead the 'boostified' version of turtle aka Boost.Mock.