diff options
Diffstat (limited to 'test/test1.c')
-rw-r--r-- | test/test1.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/test/test1.c b/test/test1.c index d87443f..b340db1 100644 --- a/test/test1.c +++ b/test/test1.c @@ -102,7 +102,7 @@ void* operator new[](long unsigned int len) __attribute__((alias("emulate_cc_new void operator delete(void* p, unsigned long len) __attribute__((alias("emulate_cc_delete"))); void operator delete[](void* p, unsigned long len) __attribute__((alias("emulate_cc_delete"))); void* __cxa_pure_virtual = 0; -__gxx_personality_v0 +void *__gxx_personality_v0=0; #include "../arg.h" @@ -157,15 +157,25 @@ exit_error: CmdArgFlag *enable = new CmdArgFlag(); CmdArgFlagConf enableConf = CmdArgFlagConf(); - //CmdArgDefault enableDefault = CmdArgDefault((char *)"-a", &enableConf, (char *)"enable A", &enable); + CmdArgDefault enableDefault = CmdArgDefault((char *)"-a", &enableConf, (char *)"enable A", enable); - CmdArgFlag enableText = CmdArgFlag(); + CmdArgFlag *enableText = new CmdArgFlag(); CmdArgFlagConf enableTextConf = CmdArgFlagConf(); - CmdArgDefault enableTextDefault = CmdArgDefault((char *)"-t", &enableTextConf, (char *)"enable text", &enableText); + CmdArgDefault enableTextDefault = CmdArgDefault((char *)"-t", &enableTextConf, (char *)"enable text", enableText); CmdArg arguments = CmdArg(); + arguments.add(&enableTextDefault); + arguments.add(&enableDefault); - //enableConf(); + arguments.load(argc, argv); + + if (enable->getValue()) { + printf("enable is set\n"); + } + + if (enableText->getValue()) { + printf("enable text is set\n"); + } } |