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.

20 lines
435 B

11 years ago
#include <boost/test/unit_test.hpp>
#include "clangmm.h"
#include <string>
BOOST_AUTO_TEST_CASE(cursor) {
// [ Should be changed with mockery
std::string path("./case/main.cpp");
clang::Index index(0, 0);
clang::TranslationUnit tu(index, path);
11 years ago
// ]
clang::SourceLocation location(tu.cx_tu, path, 6, 4);
clang::Cursor cursor(tu.cx_tu, location);
11 years ago
BOOST_CHECK(cursor.get_kind() == clang::CursorKind::ReturnStmt);
11 years ago
}