X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/f59164e3d128c7675a4d3934206346a3384e53a5..f3c0d7a59d99c2a94c6b8822291f0e42be3773c9:/icuSources/test/cintltst/cnormtst.c diff --git a/icuSources/test/cintltst/cnormtst.c b/icuSources/test/cintltst/cnormtst.c index 4acbc208..2ee0cc93 100644 --- a/icuSources/test/cintltst/cnormtst.c +++ b/icuSources/test/cintltst/cnormtst.c @@ -1,3 +1,5 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /******************************************************************** * COPYRIGHT: * Copyright (c) 1997-2016, International Business Machines Corporation and @@ -664,12 +666,12 @@ void TestCheckFCD() UChar nfd[100]; int normsize = 0; int nfdsize = 0; - + while (size != 19) { - data[size] = datachar[(rand() * 50) / RAND_MAX]; + data[size] = datachar[rand() % UPRV_LENGTHOF(datachar)]; log_verbose("0x%x", data[size]); - normsize += unorm_normalize(data + size, 1, UNORM_NFD, 0, - norm + normsize, 100 - normsize, &status); + normsize += unorm_normalize(data + size, 1, UNORM_NFD, 0, + norm + normsize, 100 - normsize, &status); if (U_FAILURE(status)) { log_data_err("unorm_quickCheck(FCD) failed: exception occured at data generation - (Are you missing data?)\n"); break; @@ -678,8 +680,8 @@ void TestCheckFCD() } log_verbose("\n"); - nfdsize = unorm_normalize(data, size, UNORM_NFD, 0, - nfd, 100, &status); + nfdsize = unorm_normalize(data, size, UNORM_NFD, 0, + nfd, 100, &status); if (U_FAILURE(status)) { log_data_err("unorm_quickCheck(FCD) failed: exception occured at normalized data generation - (Are you missing data?)\n"); }