From 3ce23e1f7110f825b557a137d09e5f55a96d78ed Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Thu, 3 Nov 2011 23:13:09 +0000 Subject: [PATCH] Fixed wrap unit test by moving emitted comments or removing them --- wrap/Class.cpp | 2 +- wrap/Constructor.cpp | 2 +- wrap/Method.cpp | 1 - wrap/tests/expected/@Point2/Point2.m | 2 +- wrap/tests/expected/@Point3/Point3.m | 2 +- wrap/tests/expected/@Point3/norm.m | 1 - wrap/tests/expected/@Test/Test.m | 2 +- wrap/tests/expected/@Test/print.m | 1 - wrap/tests/expected/new_Point2_.m | 2 +- wrap/tests/expected/new_Point2_dd.m | 2 +- wrap/tests/expected/new_Point3_ddd.m | 2 +- 11 files changed, 8 insertions(+), 11 deletions(-) diff --git a/wrap/Class.cpp b/wrap/Class.cpp index db179c847..10625731e 100644 --- a/wrap/Class.cpp +++ b/wrap/Class.cpp @@ -32,8 +32,8 @@ void Class::matlab_proxy(const string& classFile) { if(verbose_) cerr << "generating " << classFile << endl; // emit class proxy code - ofs << "classdef " << name << endl; emit_header_comment(ofs,"%"); + ofs << "classdef " << name << endl; ofs << " properties" << endl; ofs << " self = 0" << endl; ofs << " end" << endl; diff --git a/wrap/Constructor.cpp b/wrap/Constructor.cpp index 3493e62da..9caf4793f 100644 --- a/wrap/Constructor.cpp +++ b/wrap/Constructor.cpp @@ -55,10 +55,10 @@ void Constructor::matlab_mfile(const string& toolboxPath, const string& classNam if(verbose_) cerr << "generating " << wrapperFile << endl; // generate code + emit_header_comment(ofs, "%"); ofs << "function result = " << name << "(obj"; if (args.size()) ofs << "," << args.names(); ofs << ")" << endl; - emit_header_comment(ofs, "%"); ofs << " error('need to compile " << name << ".cpp');" << endl; ofs << "end" << endl; diff --git a/wrap/Method.cpp b/wrap/Method.cpp index ba88a8243..1e0cd134e 100644 --- a/wrap/Method.cpp +++ b/wrap/Method.cpp @@ -60,7 +60,6 @@ void Method::matlab_mfile(const string& classPath) { if (args_.size()) ofs << "," << args_.names(); ofs << ")" << endl; ofs << "% usage: obj." << name_ << "(" << args_.names() << ")" << endl; - emit_header_comment(ofs, "%"); ofs << " error('need to compile " << name_ << ".cpp');" << endl; ofs << "end" << endl; diff --git a/wrap/tests/expected/@Point2/Point2.m b/wrap/tests/expected/@Point2/Point2.m index 23738182d..222036dca 100644 --- a/wrap/tests/expected/@Point2/Point2.m +++ b/wrap/tests/expected/@Point2/Point2.m @@ -1,5 +1,5 @@ -classdef Point2 % automatically generated by wrap on 2011-Oct-31 +classdef Point2 properties self = 0 end diff --git a/wrap/tests/expected/@Point3/Point3.m b/wrap/tests/expected/@Point3/Point3.m index e2633f4ab..8ad50cf39 100644 --- a/wrap/tests/expected/@Point3/Point3.m +++ b/wrap/tests/expected/@Point3/Point3.m @@ -1,5 +1,5 @@ -classdef Point3 % automatically generated by wrap on 2011-Oct-31 +classdef Point3 properties self = 0 end diff --git a/wrap/tests/expected/@Point3/norm.m b/wrap/tests/expected/@Point3/norm.m index 6467afe40..dc4e62597 100644 --- a/wrap/tests/expected/@Point3/norm.m +++ b/wrap/tests/expected/@Point3/norm.m @@ -1,5 +1,4 @@ function result = norm(obj) % usage: obj.norm() -% automatically generated by wrap on 2011-Oct-31 error('need to compile norm.cpp'); end diff --git a/wrap/tests/expected/@Test/Test.m b/wrap/tests/expected/@Test/Test.m index 772e9476d..14a0ba2a1 100644 --- a/wrap/tests/expected/@Test/Test.m +++ b/wrap/tests/expected/@Test/Test.m @@ -1,5 +1,5 @@ -classdef Test % automatically generated by wrap on 2011-Oct-31 +classdef Test properties self = 0 end diff --git a/wrap/tests/expected/@Test/print.m b/wrap/tests/expected/@Test/print.m index 8156885bc..cf181c3cf 100644 --- a/wrap/tests/expected/@Test/print.m +++ b/wrap/tests/expected/@Test/print.m @@ -1,5 +1,4 @@ function result = print(obj) % usage: obj.print() -% automatically generated by wrap on 2011-Oct-31 error('need to compile print.cpp'); end diff --git a/wrap/tests/expected/new_Point2_.m b/wrap/tests/expected/new_Point2_.m index 3fbdf280e..5b3756ef7 100644 --- a/wrap/tests/expected/new_Point2_.m +++ b/wrap/tests/expected/new_Point2_.m @@ -1,4 +1,4 @@ -function result = new_Point2_(obj) % automatically generated by wrap on 2011-Oct-31 +function result = new_Point2_(obj) error('need to compile new_Point2_.cpp'); end diff --git a/wrap/tests/expected/new_Point2_dd.m b/wrap/tests/expected/new_Point2_dd.m index c7e790ecb..f83962584 100644 --- a/wrap/tests/expected/new_Point2_dd.m +++ b/wrap/tests/expected/new_Point2_dd.m @@ -1,4 +1,4 @@ -function result = new_Point2_dd(obj,x,y) % automatically generated by wrap on 2011-Oct-31 +function result = new_Point2_dd(obj,x,y) error('need to compile new_Point2_dd.cpp'); end diff --git a/wrap/tests/expected/new_Point3_ddd.m b/wrap/tests/expected/new_Point3_ddd.m index 818478f37..3b15dcfdb 100644 --- a/wrap/tests/expected/new_Point3_ddd.m +++ b/wrap/tests/expected/new_Point3_ddd.m @@ -1,4 +1,4 @@ -function result = new_Point3_ddd(obj,x,y,z) % automatically generated by wrap on 2011-Oct-31 +function result = new_Point3_ddd(obj,x,y,z) error('need to compile new_Point3_ddd.cpp'); end