projects
/
YACASL2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ユニットテストの修正
[YACASL2.git]
/
test
/
unit
/
n2word
/
getint.c
diff --git
a/test/unit/n2word/getint.c
b/test/unit/n2word/getint.c
index
945db38
..
8d1d04e
100644
(file)
--- a/
test/unit/n2word/getint.c
+++ b/
test/unit/n2word/getint.c
@@
-9,14
+9,18
@@
int main(){
"0", "01", "1a", "-5G", "123", "32767", "32768", "32769",
"-1", "-2345", "-32768", "-32769", "-32770"
};
"0", "01", "1a", "-5G", "123", "32767", "32768", "32769",
"-1", "-2345", "-32768", "-32769", "-32770"
};
+
+ cerr = malloc_chk(sizeof(CERR), "cerr"); /* エラーの初期化 */
+ addcerrlist_word();
for(i = 0; i < sizeof(str)/sizeof(str[0]); i++) {
for(i = 0; i < sizeof(str)/sizeof(str[0]); i++) {
+ cerr->num = 0;
r = n2word(str[i]);
printf("%s\t0x%04x", str[i], r);
r = n2word(str[i]);
printf("%s\t0x%04x", str[i], r);
- if(cerrno > 0) {
- printf("\tError - %d\t%s", cerrno, cerrmsg);
- freecerr();
+ if(cerr->num > 0) {
+ printf("\tError - %d\t%s", cerr->num, cerr->msg);
}
printf("\n");
}
}
printf("\n");
}
+ freecerr();
return 0;
}
return 0;
}