X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=test%2Funit%2Flinetok%2Flinetok.c;h=28555cd26b2e0fa90d79e5f8f99dc93ea479e445;hp=a4ea1734e053393869cf09d0f10a911a5f407257;hb=06ccc214315a98123b3ac4c91af1e1b09ab7fc07;hpb=e6f41d41cff07e56b0cbc7d515c46327206c9f40 diff --git a/test/unit/linetok/linetok.c b/test/unit/linetok/linetok.c index a4ea173..28555cd 100644 --- a/test/unit/linetok/linetok.c +++ b/test/unit/linetok/linetok.c @@ -17,8 +17,10 @@ int main(){ "\n", " ;comment\n" }; + CMDLINE *testcl = malloc(sizeof(CMDLINE)); - + cerr = malloc_chk(sizeof(CERR), "cerr"); /* エラーの初期化 */ + addcerrlist_assemble(); for(i = 0; i < sizeof testline /sizeof testline[0]; i++) { printf("%d: %s", i, testline[i]); testcl = linetok(testline[i]); @@ -36,11 +38,11 @@ int main(){ } } } - if(cerrno != 0) { - printf("\terror - %d: %s\n", cerrno, cerrmsg); - freecerr(); + if(cerr->num != 0) { + printf("\terror - %d: %s\n", cerr->num, cerr->msg); } printf("\n"); } + freecerr(); return 0; }