1 #include "clangmm.hpp" 2 #include <cassert> 3 #include <map> 4 #include <string> 5 main()6int main() { 7 std::string tests_path = LIBCLANGMM_TESTS_PATH; 8 std::string path(tests_path + "/case/main.cpp"); 9 10 auto index = std::make_shared<clangmm::Index>(0, 0); 11 12 clangmm::TranslationUnit tu(index, path, {}); 13 14 std::string buffer = "int main(int argc, char *argv[]) {\n" 15 "std::cout << \"Hello World!\" << std::endl;\n" 16 "return 0\n" 17 "}\n"; 18 19 assert(tu.reparse(buffer) == 0); 20 } 21