diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-10-18 23:27:48 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:26 -0500 |
commit | d6db8e6cb8e60e82328deda1bb5d940859deb0b7 (patch) | |
tree | 69c16a1f86c4435f87c67363442a4cf96252af50 | |
parent | d04efb30a013c3c9061f62081fc6fc020bbbd7b0 (diff) | |
download | samba-d6db8e6cb8e60e82328deda1bb5d940859deb0b7.tar.gz samba-d6db8e6cb8e60e82328deda1bb5d940859deb0b7.tar.bz2 samba-d6db8e6cb8e60e82328deda1bb5d940859deb0b7.zip |
r19404: fixed the LOCAL-ICONV test
(This used to be commit 0b3e83814bdf015064d7dd1f26cf9ec3ddadc7f4)
-rw-r--r-- | source4/torture/local/iconv.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c index e41e40dc8d..8d66f4fd58 100644 --- a/source4/torture/local/iconv.c +++ b/source4/torture/local/iconv.c @@ -264,7 +264,11 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint) codepoint_t c; size = push_codepoint((char *)buf, codepoint); - torture_assert(tctx, size != -1 || (codepoint >= 0xd800 && codepoint <= 0x10000), "Invalid Codepoint range"); + torture_assert(tctx, size != -1 || (codepoint >= 0xd800 && codepoint <= 0x10000), + "Invalid Codepoint range"); + + if (size == -1) return true; + buf[size] = random(); buf[size+1] = random(); buf[size+2] = random(); @@ -272,8 +276,9 @@ static bool test_codepoint(struct torture_context *tctx, unsigned int codepoint) c = next_codepoint((char *)buf, &size2); - torture_assert(tctx, c == codepoint, talloc_asprintf(tctx, - "next_codepoint(%u) failed - gave %u", codepoint, c)); + torture_assert(tctx, c == codepoint, + talloc_asprintf(tctx, + "next_codepoint(%u) failed - gave %u", codepoint, c)); torture_assert(tctx, size2 == size, talloc_asprintf(tctx, "next_codepoint(%u) gave wrong size %d (should be %d)\n", |