Fixed wrap unit test by moving emitted comments or removing them
parent
080496db1d
commit
3ce23e1f71
|
@ -32,8 +32,8 @@ void Class::matlab_proxy(const string& classFile) {
|
||||||
if(verbose_) cerr << "generating " << classFile << endl;
|
if(verbose_) cerr << "generating " << classFile << endl;
|
||||||
|
|
||||||
// emit class proxy code
|
// emit class proxy code
|
||||||
ofs << "classdef " << name << endl;
|
|
||||||
emit_header_comment(ofs,"%");
|
emit_header_comment(ofs,"%");
|
||||||
|
ofs << "classdef " << name << endl;
|
||||||
ofs << " properties" << endl;
|
ofs << " properties" << endl;
|
||||||
ofs << " self = 0" << endl;
|
ofs << " self = 0" << endl;
|
||||||
ofs << " end" << endl;
|
ofs << " end" << endl;
|
||||||
|
|
|
@ -55,10 +55,10 @@ void Constructor::matlab_mfile(const string& toolboxPath, const string& classNam
|
||||||
if(verbose_) cerr << "generating " << wrapperFile << endl;
|
if(verbose_) cerr << "generating " << wrapperFile << endl;
|
||||||
|
|
||||||
// generate code
|
// generate code
|
||||||
|
emit_header_comment(ofs, "%");
|
||||||
ofs << "function result = " << name << "(obj";
|
ofs << "function result = " << name << "(obj";
|
||||||
if (args.size()) ofs << "," << args.names();
|
if (args.size()) ofs << "," << args.names();
|
||||||
ofs << ")" << endl;
|
ofs << ")" << endl;
|
||||||
emit_header_comment(ofs, "%");
|
|
||||||
ofs << " error('need to compile " << name << ".cpp');" << endl;
|
ofs << " error('need to compile " << name << ".cpp');" << endl;
|
||||||
ofs << "end" << endl;
|
ofs << "end" << endl;
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,6 @@ void Method::matlab_mfile(const string& classPath) {
|
||||||
if (args_.size()) ofs << "," << args_.names();
|
if (args_.size()) ofs << "," << args_.names();
|
||||||
ofs << ")" << endl;
|
ofs << ")" << endl;
|
||||||
ofs << "% usage: obj." << name_ << "(" << args_.names() << ")" << endl;
|
ofs << "% usage: obj." << name_ << "(" << args_.names() << ")" << endl;
|
||||||
emit_header_comment(ofs, "%");
|
|
||||||
ofs << " error('need to compile " << name_ << ".cpp');" << endl;
|
ofs << " error('need to compile " << name_ << ".cpp');" << endl;
|
||||||
ofs << "end" << endl;
|
ofs << "end" << endl;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
classdef Point2
|
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
% automatically generated by wrap on 2011-Oct-31
|
||||||
|
classdef Point2
|
||||||
properties
|
properties
|
||||||
self = 0
|
self = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
classdef Point3
|
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
% automatically generated by wrap on 2011-Oct-31
|
||||||
|
classdef Point3
|
||||||
properties
|
properties
|
||||||
self = 0
|
self = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
function result = norm(obj)
|
function result = norm(obj)
|
||||||
% usage: obj.norm()
|
% usage: obj.norm()
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
|
||||||
error('need to compile norm.cpp');
|
error('need to compile norm.cpp');
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
classdef Test
|
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
% automatically generated by wrap on 2011-Oct-31
|
||||||
|
classdef Test
|
||||||
properties
|
properties
|
||||||
self = 0
|
self = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
function result = print(obj)
|
function result = print(obj)
|
||||||
% usage: obj.print()
|
% usage: obj.print()
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
|
||||||
error('need to compile print.cpp');
|
error('need to compile print.cpp');
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function result = new_Point2_(obj)
|
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
% automatically generated by wrap on 2011-Oct-31
|
||||||
|
function result = new_Point2_(obj)
|
||||||
error('need to compile new_Point2_.cpp');
|
error('need to compile new_Point2_.cpp');
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function result = new_Point2_dd(obj,x,y)
|
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
% automatically generated by wrap on 2011-Oct-31
|
||||||
|
function result = new_Point2_dd(obj,x,y)
|
||||||
error('need to compile new_Point2_dd.cpp');
|
error('need to compile new_Point2_dd.cpp');
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
function result = new_Point3_ddd(obj,x,y,z)
|
|
||||||
% automatically generated by wrap on 2011-Oct-31
|
% 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');
|
error('need to compile new_Point3_ddd.cpp');
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue