Updated wrap unit tests
parent
592a251a05
commit
dc036a0891
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("argChar",nargout,nargin-1,1);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
char a = unwrap< char >(in[1]);
|
||||
self->argChar(a);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("argUChar",nargout,nargin-1,1);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
unsigned char a = unwrap< unsigned char >(in[1]);
|
||||
self->argUChar(a);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("dim",nargout,nargin-1,0);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
int result = self->dim();
|
||||
out[0] = wrap< int >(result);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("returnChar",nargout,nargin-1,0);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
char result = self->returnChar();
|
||||
out[0] = wrap< char >(result);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("vectorConfusion",nargout,nargin-1,0);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
VectorNotEigen result = self->vectorConfusion();
|
||||
out[0] = wrap_shared_ptr(make_shared< VectorNotEigen >(result),"VectorNotEigen");
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("x",nargout,nargin-1,0);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
double result = self->x();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("y",nargout,nargin-1,0);
|
||||
shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
boost::shared_ptr<Point2> self = unwrap_shared_ptr< Point2 >(in[0],"Point2");
|
||||
double result = self->y();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("norm",nargout,nargin-1,0);
|
||||
shared_ptr<Point3> self = unwrap_shared_ptr< Point3 >(in[0],"Point3");
|
||||
boost::shared_ptr<Point3> self = unwrap_shared_ptr< Point3 >(in[0],"Point3");
|
||||
double result = self->norm();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("arg_EigenConstRef",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Matrix& value = *unwrap_shared_ptr< Matrix >(in[1], "Matrix");
|
||||
self->arg_EigenConstRef(value);
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("create_MixedPtrs",nargout,nargin-1,0);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
pair< Test, shared_ptr<Test> > result = self->create_MixedPtrs();
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
pair< Test, boost::shared_ptr<Test> > result = self->create_MixedPtrs();
|
||||
out[0] = wrap_shared_ptr(make_shared< Test >(result.first),"Test");
|
||||
out[1] = wrap_shared_ptr(result.second,"Test");
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("create_ptrs",nargout,nargin-1,0);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
pair< shared_ptr<Test>, shared_ptr<Test> > result = self->create_ptrs();
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
pair< boost::shared_ptr<Test>, boost::shared_ptr<Test> > result = self->create_ptrs();
|
||||
out[0] = wrap_shared_ptr(result.first,"Test");
|
||||
out[1] = wrap_shared_ptr(result.second,"Test");
|
||||
}
|
||||
|
|
|
@ -5,6 +5,6 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("print",nargout,nargin-1,0);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
self->print();
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_Point2Ptr",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
bool value = unwrap< bool >(in[1]);
|
||||
shared_ptr<Point2> result = self->return_Point2Ptr(value);
|
||||
boost::shared_ptr<Point2> result = self->return_Point2Ptr(value);
|
||||
out[0] = wrap_shared_ptr(result,"Point2");
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_Test",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
Test result = self->return_Test(value);
|
||||
out[0] = wrap_shared_ptr(make_shared< Test >(result),"Test");
|
||||
}
|
||||
|
|
|
@ -5,8 +5,8 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_TestPtr",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
shared_ptr<Test> result = self->return_TestPtr(value);
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> value = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
boost::shared_ptr<Test> result = self->return_TestPtr(value);
|
||||
out[0] = wrap_shared_ptr(result,"Test");
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_bool",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
bool value = unwrap< bool >(in[1]);
|
||||
bool result = self->return_bool(value);
|
||||
out[0] = wrap< bool >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_double",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
double value = unwrap< double >(in[1]);
|
||||
double result = self->return_double(value);
|
||||
out[0] = wrap< double >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_field",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Test& t = *unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
bool result = self->return_field(t);
|
||||
out[0] = wrap< bool >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_int",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
int value = unwrap< int >(in[1]);
|
||||
int result = self->return_int(value);
|
||||
out[0] = wrap< int >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_matrix1",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Matrix value = unwrap< Matrix >(in[1]);
|
||||
Matrix result = self->return_matrix1(value);
|
||||
out[0] = wrap< Matrix >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_matrix2",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Matrix value = unwrap< Matrix >(in[1]);
|
||||
Matrix result = self->return_matrix2(value);
|
||||
out[0] = wrap< Matrix >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_pair",nargout,nargin-1,2);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Vector v = unwrap< Vector >(in[1]);
|
||||
Matrix A = unwrap< Matrix >(in[2]);
|
||||
pair< Vector, Matrix > result = self->return_pair(v,A);
|
||||
|
|
|
@ -5,10 +5,10 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_ptrs",nargout,nargin-1,2);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test");
|
||||
pair< shared_ptr<Test>, shared_ptr<Test> > result = self->return_ptrs(p1,p2);
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> p1 = unwrap_shared_ptr< Test >(in[1], "Test");
|
||||
boost::shared_ptr<Test> p2 = unwrap_shared_ptr< Test >(in[2], "Test");
|
||||
pair< boost::shared_ptr<Test>, boost::shared_ptr<Test> > result = self->return_ptrs(p1,p2);
|
||||
out[0] = wrap_shared_ptr(result.first,"Test");
|
||||
out[1] = wrap_shared_ptr(result.second,"Test");
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_size_t",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
size_t value = unwrap< size_t >(in[1]);
|
||||
size_t result = self->return_size_t(value);
|
||||
out[0] = wrap< size_t >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_string",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
string value = unwrap< string >(in[1]);
|
||||
string result = self->return_string(value);
|
||||
out[0] = wrap< string >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_vector1",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Vector value = unwrap< Vector >(in[1]);
|
||||
Vector result = self->return_vector1(value);
|
||||
out[0] = wrap< Vector >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@ using namespace geometry;
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("return_vector2",nargout,nargin-1,1);
|
||||
shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
boost::shared_ptr<Test> self = unwrap_shared_ptr< Test >(in[0],"Test");
|
||||
Vector value = unwrap< Vector >(in[1]);
|
||||
Vector result = self->return_vector2(value);
|
||||
out[0] = wrap< Vector >(result);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
echo on
|
||||
|
||||
toolboxpath = mfilename('fullpath');
|
||||
delims = find(toolboxpath == '/');
|
||||
delims = find(toolboxpath == '/' | toolboxpath == '\');
|
||||
toolboxpath = toolboxpath(1:(delims(end)-1));
|
||||
clear delims
|
||||
addpath(toolboxpath);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("memberFunction",nargout,nargin-1,0);
|
||||
shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||
boost::shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||
double result = self->memberFunction();
|
||||
out[0] = wrap< double >(result);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("nsArg",nargout,nargin-1,1);
|
||||
shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||
boost::shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||
ns1::ClassB& arg = *unwrap_shared_ptr< ns1::ClassB >(in[1], "ns1ClassB");
|
||||
int result = self->nsArg(arg);
|
||||
out[0] = wrap< int >(result);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
void mexFunction(int nargout, mxArray *out[], int nargin, const mxArray *in[])
|
||||
{
|
||||
checkArguments("nsReturn",nargout,nargin-1,1);
|
||||
shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||
boost::shared_ptr<ns2::ClassA> self = unwrap_shared_ptr< ns2::ClassA >(in[0],"ns2ClassA");
|
||||
double q = unwrap< double >(in[1]);
|
||||
ns2::ns3::ClassB result = self->nsReturn(q);
|
||||
out[0] = wrap_shared_ptr(make_shared< ns2::ns3::ClassB >(result),"ns2ns3ClassB");
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
echo on
|
||||
|
||||
toolboxpath = mfilename('fullpath');
|
||||
delims = find(toolboxpath == '/');
|
||||
delims = find(toolboxpath == '/' | toolboxpath == '\');
|
||||
toolboxpath = toolboxpath(1:(delims(end)-1));
|
||||
clear delims
|
||||
addpath(toolboxpath);
|
||||
|
|
Loading…
Reference in New Issue