/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2008, International Business Machines Corporation and
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************
************************************************************************
#include "jamotest.h"
#include "unicode/utypes.h"
#include "unicode/translit.h"
+#include "cmemory.h"
#include "cpdtrans.h"
// SEP is the disambiguation separator used by Latin-Jamo and Jamo-Latin
Transliterator* latinJamo = Transliterator::createInstance("Latin-Jamo", UTRANS_FORWARD, parseError, status);
if (latinJamo == 0 || U_FAILURE(status)) {
- errln("FAIL: createInstance() returned 0");
+ dataerrln("FAIL: createInstance() returned 0 - %s", u_errorName(status));
return;
}
"karka", "(Ki)(A)(L)(Ki)(A)", "kalka",
};
- enum { CASE_length = sizeof(CASE) / sizeof(CASE[0]) };
+ enum { CASE_length = UPRV_LENGTHOF(CASE) };
int32_t i;
for (i=0; i<CASE_length; i+=3) {
t = Transliterator::createInstance("NFD", UTRANS_FORWARD, status); // was Hangul-Jamo
if (U_FAILURE(status) || t == 0) {
- errln("FAIL: createInstance failed");
+ dataerrln("FAIL: createInstance failed");
return;
}
expect(*t, hangul, jamo);
t = Transliterator::createInstance("Latin-Jamo", UTRANS_FORWARD, status);
if (U_FAILURE(status) || t == 0) {
- errln("FAIL: createInstance failed");
+ dataerrln("FAIL: createInstance failed - %s", u_errorName(status));
return;
}
expect(*t, latin, jamo);
"\\ucc38\\uc870\\ud558\\uc2ed\\uc2dc\\uc624."
};
- enum { WHAT_IS_UNICODE_length = sizeof(WHAT_IS_UNICODE) / sizeof(WHAT_IS_UNICODE[0]) };
+ enum { WHAT_IS_UNICODE_length = UPRV_LENGTHOF(WHAT_IS_UNICODE) };
UParseError parseError;
UErrorCode status = U_ZERO_ERROR;
if (latinJamo == 0 || jamoHangul == 0 || U_FAILURE(status)) {
delete latinJamo;
delete jamoHangul;
- errln("FAIL: createInstance returned NULL");
+ dataerrln("FAIL: createInstance returned NULL - %s", u_errorName(status));
return;
}
Transliterator* jamoLatin = latinJamo->createInverse(status);