add type and name to banch mark arg

This commit is contained in:
lyon 2021-08-31 23:56:12 +08:00
parent cc25084ea0
commit c0a3860321

View File

@ -86,6 +86,8 @@ int32_t main()
{ {
Arg *arg = New_arg(NULL); Arg *arg = New_arg(NULL);
arg = arg_setInt(arg, 0); arg = arg_setInt(arg, 0);
arg = arg_setType(arg, "int");
arg = arg_setName(arg, "testInt1");
checker_printMemUsage("int arg"); checker_printMemUsage("int arg");
arg_deinit(arg); arg_deinit(arg);
checker_assertMemFree(); checker_assertMemFree();
@ -93,6 +95,8 @@ int32_t main()
{ {
Arg *arg = New_arg(NULL); Arg *arg = New_arg(NULL);
arg = arg_setFloat(arg, 0); arg = arg_setFloat(arg, 0);
arg = arg_setType(arg, "float");
arg = arg_setName(arg, "testFloat1");
checker_printMemUsage("float arg"); checker_printMemUsage("float arg");
arg_deinit(arg); arg_deinit(arg);
checker_assertMemFree(); checker_assertMemFree();
@ -100,6 +104,8 @@ int32_t main()
{ {
Arg *arg = New_arg(NULL); Arg *arg = New_arg(NULL);
arg = arg_setStr(arg, "test string"); arg = arg_setStr(arg, "test string");
arg = arg_setType(arg, "str");
arg = arg_setName(arg, "testStr");
checker_printMemUsage("str arg"); checker_printMemUsage("str arg");
arg_deinit(arg); arg_deinit(arg);
checker_assertMemFree(); checker_assertMemFree();