From 6478c6db964074c473f0f8c4f1afa8a7ba59baf9 Mon Sep 17 00:00:00 2001 From: "kevin.larke" Date: Tue, 21 Apr 2020 14:57:25 -0400 Subject: [PATCH] main.cpp : Added object_t duplicate() test. --- src/cwtest/main.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cwtest/main.cpp b/src/cwtest/main.cpp index 9cc5d38..2f932f3 100644 --- a/src/cwtest/main.cpp +++ b/src/cwtest/main.cpp @@ -139,6 +139,16 @@ void fileSysTest( cw::object_t* cfg, int argc, const char* argv[] ) cw::mem::release(pp); cw::mem::release(fn); + + + const char myPath[] = "~/src/foo"; + + char* expPath = cw::filesys::expandPath(myPath); + + cwLogInfo("%s %s",myPath,expPath); + + cw::mem::release(expPath); + } @@ -182,6 +192,13 @@ void objectTest( cw::object_t* cfg, int argc, const char* argv[] ) unsigned i = o->to_string(buf,bufN); printf("%i : %s\n",i, buf); + + cw::object_t* oo = o->duplicate(); + + oo->print(); + + oo->free(); + o->free(); }