Browse Source

update bindings of ctags, but disable test of it for now

python
Jørgen Lien Sellæg 5 years ago
parent
commit
92679161f4
  1. 8
      src/ctags.cpp
  2. 6
      tests/python_bindings/CMakeLists.txt

8
src/ctags.cpp

@ -289,11 +289,17 @@ void Ctags::init_module(py::module &api) {
.def_readwrite("symbol", &Ctags::Location::symbol)
.def_readwrite("scope", &Ctags::Location::scope)
.def_readwrite("source", &Ctags::Location::source)
.def_readwrite("kind", &Ctags::Location::kind)
.def("__bool__", &Ctags::Location::operator bool)
;
ctags
.def(py::init<const boost::filesystem::path &, bool, bool, std::string>(),
py::arg("path"),
py::arg("enable_scope"),
py::arg("enable_kind"),
py::arg("languages"))
.def("get_location", &Ctags::get_location,
py::arg("line"),
py::arg("add_markup"),
@ -303,6 +309,8 @@ void Ctags::init_module(py::module &api) {
py::arg("name"),
py::arg("type"),
py::arg("languages"))
.def_readwrite("project_path", &Ctags::project_path)
.def("__bool__", &Ctags::operator bool)
;
}

6
tests/python_bindings/CMakeLists.txt

@ -23,9 +23,9 @@ add_executable(pb_config_test Config_tests/config_test.cc $<TARGET_OBJECTS:test_
target_link_libraries(pb_config_test test_suite)
add_test(pb_config_test pb_config_test)
add_executable(pb_ctags_test Ctags_tests/ctags_test.cc $<TARGET_OBJECTS:test_stubs>)
target_link_libraries(pb_ctags_test test_suite)
add_test(pb_ctags_test pb_ctags_test)
# add_executable(pb_ctags_test Ctags_tests/ctags_test.cc $<TARGET_OBJECTS:test_stubs>)
# target_link_libraries(pb_ctags_test test_suite)
# add_test(pb_ctags_test pb_ctags_test)
if(LIBLLDB_FOUND AND NOT DEBIAN_STRETCH_FOUND)
add_executable(pb_debug_lldb_test Debug_lldb_tests/debug_lldb_test.cc $<TARGET_OBJECTS:test_stubs>)

Loading…
Cancel
Save