diff options
author | Richard Braun <rbraun@sceen.net> | 2017-06-23 23:15:32 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-06-23 23:15:32 +0200 |
commit | d471bf5cb67f8df526b769556800d7341c64560c (patch) | |
tree | cc4a60b5013a0a99f452c096de5c90c2a9e2ee2b | |
parent | 24ae3a1e9ab000b85414227da5b897f89aaa030d (diff) |
test_fmt_sscanf: fix hex integers conversion tests
-rw-r--r-- | test/test_fmt_sscanf.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_fmt_sscanf.c b/test/test_fmt_sscanf.c index 55150df..eb87ac6 100644 --- a/test/test_fmt_sscanf.c +++ b/test/test_fmt_sscanf.c @@ -276,7 +276,6 @@ test_15(void) reta = sscanf(STRING, FORMAT, &ia); retb = fmt_sscanf(STRING, FORMAT, &ib); check(reta == retb); - check(ia == ib); #undef FORMAT #undef STRING } @@ -432,8 +431,8 @@ test_25(void) int ia, ib; int ja, jb; -#define STRING "a" QUOTE(TEST_INT_OCTAL) "b" QUOTE(TEST_INT_HEX) "c" -#define FORMAT "a%ob%xc" +#define STRING "x" QUOTE(TEST_INT_OCTAL) "y" QUOTE(TEST_INT_HEX) "z" +#define FORMAT "x%oy%xz" reta = sscanf(STRING, FORMAT, &ia, &ja); retb = fmt_sscanf(STRING, FORMAT, &ib, &jb); check(reta == retb); @@ -450,8 +449,8 @@ test_26(void) int ia, ib; int ja, jb; -#define STRING "a" QUOTE(TEST_INT_HEX) "b" QUOTE(TEST_INT_OCTAL) "c" -#define FORMAT "a%xb%oc" +#define STRING "x" QUOTE(TEST_INT_HEX) "y" QUOTE(TEST_INT_OCTAL) "z" +#define FORMAT "x%xy%oz" reta = sscanf(STRING, FORMAT, &ia, &ja); retb = fmt_sscanf(STRING, FORMAT, &ib, &jb); check(reta == retb); |