summaryrefslogtreecommitdiff
path: root/harness.c
diff options
context:
space:
mode:
Diffstat (limited to 'harness.c')
-rw-r--r--harness.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/harness.c b/harness.c
index b3dd500..1e3dfb9 100644
--- a/harness.c
+++ b/harness.c
@@ -31,6 +31,9 @@
* $ gcc -g harness.c -o harness
*
* Rev History: Rick McGowan, new file April 2001.
+ * Sept 19, 2002: Corrected error on line 234: utf16_buf[2] becomes utf16_result[2]
+ * per report from Iain Murray.
+ * July 3, 2003: Updated printout message.
*
*/
@@ -195,7 +198,6 @@ int test02() {
case sourceIllegal: printf("sourceIllegal\t"); break;
}
if (result != conversionOK) {
-
printf("Test02B for %d (0x%x), input %04x,%04x; output %s; result %d\n",
i, utf32_buf[0], utf16_buf[0], utf16_buf[1], utf8_buf, result);
if ((i != UNI_SUR_LOW_START) && (i != UNI_SUR_HIGH_START)) {
@@ -230,7 +232,7 @@ int test02() {
/*
* Test UTF8 -> UTF16, with legality check on.
*/
- result = ConvertUTF8toUTF16((const UTF8 **) &utf8SourceStart, &(utf8_buf[trailingBytesForUTF8[utf8_buf[0]]+1]), &utf16TargetStart, &(utf16_buf[2]), strictConversion);
+ result = ConvertUTF8toUTF16((const UTF8 **) &utf8SourceStart, &(utf8_buf[trailingBytesForUTF8[utf8_buf[0]]+1]), &utf16TargetStart, &(utf16_result[2]), strictConversion);
switch (result) {
default: fprintf(stderr, "Test02C fatal error: result %d for input %08x\n", result, utf32_buf[0]); exit(1);
case conversionOK: break;
@@ -281,8 +283,6 @@ int test02() {
printf("Test02E for %d: utf32 input %08x; trip output %08x (utf_16buf is %04x,%04x)\n", i, utf32_buf[0], utf32_result[0], utf16_buf[0], utf16_buf[1]);
return 0;
}
-
-
}
return 1;
}
@@ -384,7 +384,8 @@ int test03() {
main() {
printf("Three tests of round-trip conversions will be performed.\n");
- printf("Two illegal result messages are expected; one in test 02A; one in test 03A .\n\n");
+ printf("Two illegal result messages are expected; one in test 02A; one in test 03A.\n");
+ printf("These are for tests of Surrogate conversion.\n\n");
fflush(stdout);
if (test01()) { printf("******** Test01 succeeded without error. ********\n\n"); }
else { printf("-------- Test01 failed. --------\n\n"); }