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.

21 lines
533 B

#include "clangmm.hpp"
#include <cassert>
#include <map>
#include <string>
11 years ago
int main() {
std::string tests_path = LIBCLANGMM_TESTS_PATH;
std::string path(tests_path + "/case/main.cpp");
11 years ago
auto index = std::make_shared<clangmm::Index>(0, 0);
clangmm::TranslationUnit tu(index, path, {});
11 years ago
std::string buffer = "int main(int argc, char *argv[]) {\n"
"std::cout << \"Hello World!\" << std::endl;\n"
"return 0\n"
"}\n";
11 years ago
assert(tu.reparse(buffer) == 0);
11 years ago
}