diff --git a/wrap/Module.cpp b/wrap/Module.cpp index 9b2481433..fb38ec1ab 100644 --- a/wrap/Module.cpp +++ b/wrap/Module.cpp @@ -167,7 +167,7 @@ void Module::parseMarkup(const std::string& data) { [assign_a(cls,cls0)] // also clear class to avoid partial parse [assign_a(fwDec, fwDec0)]; - Rule module_content_p = basic.comments_p | class_p + Rule module_content_p = basic.comments_p | include_p | class_p | templateSingleInstantiation_p | forward_declaration_p | global_function_g | namespace_def_p; @@ -530,8 +530,7 @@ void Module::python_wrapper(const string& toolboxPath) const { wrapperFile.oss << "{\n"; // write out classes - for(const Class& cls: classes) { - cout << "tmpl args:" << cls.templateArgs.size() << endl; + for(const Class& cls: expandedClasses) { cls.python_wrapper(wrapperFile); } diff --git a/wrap/tests/geometry.h b/wrap/tests/geometry.h index 74db80c81..376e39b62 100644 --- a/wrap/tests/geometry.h +++ b/wrap/tests/geometry.h @@ -5,7 +5,6 @@ virtual class ns::OtherClass; namespace gtsam { -#include class Point2 { Point2(); Point2(double x, double y); @@ -21,7 +20,6 @@ class Point2 { void serializable() const; // Sets flag and creates export, but does not make serialization functions }; -#include class Point3 { Point3(double x, double y, double z); double norm() const; diff --git a/wrap/tests/testWrap.cpp b/wrap/tests/testWrap.cpp index d1fa87465..3f6ccb9f1 100644 --- a/wrap/tests/testWrap.cpp +++ b/wrap/tests/testWrap.cpp @@ -477,26 +477,6 @@ TEST( wrap, python_code_geometry ) { EXPECT(files_equal(epath + "geometry_python.cpp", apath + "geometry_python.cpp" )); } -/* ************************************************************************* */ -TEST( wrap, cython_code_geometry ) { - // Parse into class object - string header_path = topdir + "/wrap/tests"; - Module module(header_path,"geometry",enable_verbose); - string path = topdir + "/wrap"; - - // clean out previous generated code - fs::remove_all("actual-cython"); - - // emit MATLAB code - // make_geometry will not compile, use make testwrap to generate real make - module.cython_wrapper("actual-cython"); - string epath = path + "/tests/expected-cython/"; - string apath = "actual-cython/"; - - EXPECT(files_equal(epath + "geometry_cython.pxd", apath + "geometry_cython.pxd" )); - EXPECT(files_equal(epath + "geometry.pyx", apath + "geometry.pyx" )); -} - /* ************************************************************************* */ int main() { TestResult tr; return TestRegistry::runAllTests(tr); } /* ************************************************************************* */