main.cpp : Added object_t duplicate() test.
This commit is contained in:
parent
56a973025b
commit
6478c6db96
@ -140,6 +140,16 @@ void fileSysTest( cw::object_t* cfg, int argc, const char* argv[] )
|
|||||||
cw::mem::release(pp);
|
cw::mem::release(pp);
|
||||||
cw::mem::release(fn);
|
cw::mem::release(fn);
|
||||||
|
|
||||||
|
|
||||||
|
const char myPath[] = "~/src/foo";
|
||||||
|
|
||||||
|
char* expPath = cw::filesys::expandPath(myPath);
|
||||||
|
|
||||||
|
cwLogInfo("%s %s",myPath,expPath);
|
||||||
|
|
||||||
|
cw::mem::release(expPath);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void numbCvtTest( cw::object_t* cfg, int argc, const char* argv[] )
|
void numbCvtTest( cw::object_t* cfg, int argc, const char* argv[] )
|
||||||
@ -183,6 +193,13 @@ void objectTest( cw::object_t* cfg, int argc, const char* argv[] )
|
|||||||
unsigned i = o->to_string(buf,bufN);
|
unsigned i = o->to_string(buf,bufN);
|
||||||
printf("%i : %s\n",i, buf);
|
printf("%i : %s\n",i, buf);
|
||||||
|
|
||||||
|
cw::object_t* oo = o->duplicate();
|
||||||
|
|
||||||
|
oo->print();
|
||||||
|
|
||||||
|
oo->free();
|
||||||
|
|
||||||
|
|
||||||
o->free();
|
o->free();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user