オペランドの最大長をOPDSIZE-1(=39)からOPDSIZE(=40)に修正
[YACASL2.git] / test / unit / opdtok / opdtok.c
index dc5021e..d65a420 100644 (file)
@@ -7,12 +7,12 @@ int main(){
     char *str[] = {
         "", "GR0,GR1", "GR0,A", "GR1,12", "GR0,0,GR1",
         "\'aaa\',0", "\'aaa\',\'bbb\'", "\'aaa\'\',\'\'bbb\'", "\'aaa,bbb\'",
-        "0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9",
-        "0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0",
-        "\'01234567890123456789012345678901234567\'",
-        "\'012345678901234567890123456789012345678\'"
+        "1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0",
+        "1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1",
+        "\'1234567890123456789012345678901234567890\'",
+        "\'12345678901234567890123456789012345678901\'",
     };
-    for(i = 0; i < sizeof str / sizeof str[0]; i++) {
+    for(i = 0; i < ARRAYSIZE(str); i++) {
         printf("%s\n", str[i]);
         opd = opdtok(str[i]);
         printf("OPDC:%d\n", opd->opdc);
@@ -23,7 +23,7 @@ int main(){
             printf("Error - %d: %s\n", cerrno, cerrmsg);
             freecerr();
         }
-        printf("\n");        
+        printf("\n");
     }
     return 0;
 }