X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=test%2Funit%2Flinetok%2Flinetok.c;fp=test%2Funit%2Flinetok%2Flinetok.c;h=0000000000000000000000000000000000000000;hb=95b87bd10068d4f0f65912a7678d0aba8463724c;hp=28555cd26b2e0fa90d79e5f8f99dc93ea479e445;hpb=c5e30b2f26ebc174c49c52c67121f3be81b5bd43;p=YACASL2.git diff --git a/test/unit/linetok/linetok.c b/test/unit/linetok/linetok.c deleted file mode 100644 index 28555cd..0000000 --- a/test/unit/linetok/linetok.c +++ /dev/null @@ -1,48 +0,0 @@ -#include -#include -#include "casl2.h" -#include "assemble.h" - -int main(){ - int i, j; - char *testline[] = { - "IOTEST START\n", - " OUT OBUF1,OLEN1\n", - " OUT OBUF2,OLEN2 ;comment\n", - " OUT OBUF1,OLEN1 \n", - " OUT OBUF1,OLEN1 \n", - " OUT OBUF2,OLEN2 \n", - " OUT OBUF1, OLEN1 \n", - "BEGIN LD GR1, A\n", - "\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]); - if(testcl == NULL) { - puts("cl is NULL"); - } else { - if(testcl->label != NULL){ - printf("cl->label: %s\n", testcl->label); - } - if(testcl->cmd != NULL){ - printf("cl->cmd: %s\n", testcl->cmd); - printf("cl->opdc: %d\n", testcl->opd->opdc); - for(j = 0; j < testcl->opd->opdc; j++) { - printf("cl->opdv[%d]: %s\n", j, testcl->opd->opdv[j]); - } - } - } - if(cerr->num != 0) { - printf("\terror - %d: %s\n", cerr->num, cerr->msg); - } - printf("\n"); - } - freecerr(); - return 0; -}