X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=test%2Funit%2Flinetok%2Fcmd.c;h=d858c62a2caf7abfbe3e6a85ac71ca51bdf82d90;hb=3614c0ec65e1548e52d9149e6ef6925f37458fc6;hp=28555cd26b2e0fa90d79e5f8f99dc93ea479e445;hpb=95b87bd10068d4f0f65912a7678d0aba8463724c;p=YACASL2.git diff --git a/test/unit/linetok/cmd.c b/test/unit/linetok/cmd.c index 28555cd..d858c62 100644 --- a/test/unit/linetok/cmd.c +++ b/test/unit/linetok/cmd.c @@ -1,12 +1,13 @@ #include -#include -#include "casl2.h" #include "assemble.h" +#include "cmem.h" +#include "cerr.h" +#include "word.h" int main(){ int i, j; char *testline[] = { - "IOTEST START\n", + /* "IOTEST START\n", */ " OUT OBUF1,OLEN1\n", " OUT OBUF2,OLEN2 ;comment\n", " OUT OBUF1,OLEN1 \n", @@ -15,13 +16,14 @@ int main(){ " OUT OBUF1, OLEN1 \n", "BEGIN LD GR1, A\n", "\n", + ";comment\n", " ;comment\n" }; CMDLINE *testcl = malloc(sizeof(CMDLINE)); - cerr = malloc_chk(sizeof(CERR), "cerr"); /* エラーの初期化 */ - addcerrlist_assemble(); + addcerrlist_tok(); for(i = 0; i < sizeof testline /sizeof testline[0]; i++) { + cerr_init(); /* エラーの初期化 */ printf("%d: %s", i, testline[i]); testcl = linetok(testline[i]); if(testcl == NULL) {