X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=test%2Funit%2Faddcerrlist%2Faddcerrlist.c;h=884931c244a2f9e6f2e0782187b4d60a1cacf3a7;hp=6228a82ad8d1a0ba583263bcb8ab52dc2c0cf318;hb=4ee27a568fb9222907a566e59aaefe248f08a8e4;hpb=5562b8293058464957a1f833777e187a78220ed5 diff --git a/test/unit/addcerrlist/addcerrlist.c b/test/unit/addcerrlist/addcerrlist.c index 6228a82..884931c 100644 --- a/test/unit/addcerrlist/addcerrlist.c +++ b/test/unit/addcerrlist/addcerrlist.c @@ -1,11 +1,11 @@ #include #include "casl2.h" -CERRARRAY cerr_0[] = { +CERR cerr_0[] = { { 126, "source file is not specified" }, }; -CERRARRAY cerr_1[] = { +CERR cerr_1[] = { { 101, "label already defined" }, { 102, "label table is full" }, { 103, "label not found" }, @@ -30,23 +30,23 @@ CERRARRAY cerr_1[] = { { 125, "not GR in operand x" }, }; -CERRARRAY cerr_2[] = { +CERR cerr_2[] = { { 114, "not integer" }, { 115, "not hex" }, { 116, "out of hex range" }, }; -CERRARRAY cerr_3[] = { +CERR cerr_3[] = { { 114, "not integer" }, { 115, "not hex" }, { 116, "out of hex range" }, }; -CERRARRAY cerr_4[] = { +CERR cerr_4[] = { { 201, "Load object file - full of COMET II memory" }, }; -CERRARRAY cerr_5[] = { +CERR cerr_5[] = { { 202, "SVC input - out of Input memory" }, { 203, "SVC output - out of COMET II memory" }, { 204, "Program Register (PR) - out of COMET II memory" }, @@ -57,14 +57,15 @@ CERRARRAY cerr_5[] = { int main(){ CERRLIST *p; + /* エラーの追加 */ addcerrlist(ARRAYSIZE(cerr_0), cerr_0); addcerrlist(ARRAYSIZE(cerr_1), cerr_1); addcerrlist(ARRAYSIZE(cerr_2), cerr_2); addcerrlist(ARRAYSIZE(cerr_3), cerr_3); addcerrlist(ARRAYSIZE(cerr_4), cerr_4); addcerrlist(ARRAYSIZE(cerr_5), cerr_5); - for(p = cerr; p != NULL; p = p->next) { - printf("%d: %s\n", p->err->num, p->err->msg); + for(p = cerrlist; p != NULL; p = p->next) { + printf("%d: %s\n", p->cerr->num, p->cerr->msg); } return 0; }