mirror of https://gitlab.com/cppit/libclangmm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
511 B
19 lines
511 B
#include <boost/test/unit_test.hpp> |
|
#include "clangmm.h" |
|
#include <string> |
|
#include <map> |
|
|
|
BOOST_AUTO_TEST_CASE(translation_unit) { |
|
std::string path("./case/main.cpp"); |
|
|
|
clangmm::Index index(0, 0); |
|
|
|
clangmm::TranslationUnit tu(index, path, {}); |
|
|
|
std::string buffer = "int main(int argc, char *argv[]) {\n" |
|
"std::cout << \"Hello World!\" << std::endl;\n" |
|
"return 0\n" |
|
"}\n"; |
|
|
|
BOOST_CHECK(tu.ReparseTranslationUnit(buffer) == 0); |
|
}
|
|
|