ICU-2364 fix noisy check-in of version test

X-SVN-Rev: 11669
This commit is contained in:
Vladimir Weinstein 2003-04-24 16:48:09 +00:00
parent 114e3fc4df
commit fe6c5b30a4

View File

@ -17,21 +17,19 @@
#if !UCONFIG_NO_COLLATION
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ucol_imp.h"
#include "unicode/uloc.h"
#include "cintltst.h"
#include "capitst.h"
#include "unicode/ustring.h"
#include "unicode/ures.h"
#include "unicode/ucoleitr.h"
#include "cintltst.h"
#include "capitst.h"
#include "cmemory.h"
#include "cstring.h"
#include "ccolltst.h"
#include "ucol_imp.h"
#include <stdio.h>
static void TestAttribute(void);
int TestBufferSize(); /* defined in "capitst_1.c" */
void addCollAPITest(TestNode** root)
{
@ -592,7 +590,7 @@ void TestSafeClone() {
int32_t bufferSize = U_COL_SAFECLONE_BUFFERSIZE;
int index;
if (TestBufferSize()) {
if (U_COL_SAFECLONE_BUFFERSIZE < sizeof(UCollator)) {
log_err("U_COL_SAFECLONE_BUFFERSIZE should be larger than sizeof(UCollator)\n");
return;
}
@ -981,9 +979,9 @@ void TestElemIter()
doAssert((order1 == order2), "The second iterator advance failed should be the same as first one");
doAssert( (ucol_primaryOrder(order1) == ucol_primaryOrder(order3)), "The primary orders should be identical");
doAssert( (ucol_secondaryOrder(order1) == ucol_secondaryOrder(order3)), "The secondary orders should be identical");
doAssert( (ucol_tertiaryOrder(order1) == ucol_tertiaryOrder(order3)), "The tertiary orders should be identical");
doAssert( ((order1 & UCOL_PRIMARYMASK) == (order3 & UCOL_PRIMARYMASK)), "The primary orders should be identical");
doAssert( ((order1 & UCOL_SECONDARYMASK) == (order3 & UCOL_SECONDARYMASK)), "The secondary orders should be identical");
doAssert( ((order1 & UCOL_TERTIARYMASK) == (order3 & UCOL_TERTIARYMASK)), "The tertiary orders should be identical");
order1=ucol_next(iterator1, &status);
if (U_FAILURE(status)) {
@ -995,8 +993,8 @@ void TestElemIter()
log_err("Somehow ran out of memory stepping through the iterator2.: %s\n", myErrorName(status));
return;
}
doAssert( (ucol_primaryOrder(order1) == ucol_primaryOrder(order3)), "The primary orders should be identical");
doAssert( (ucol_tertiaryOrder(order1) != ucol_tertiaryOrder(order3)), "The tertiary orders should be different");
doAssert( ((order1 & UCOL_PRIMARYMASK) == (order3 & UCOL_PRIMARYMASK)), "The primary orders should be identical");
doAssert( ((order1 & UCOL_TERTIARYMASK) != (order3 & UCOL_TERTIARYMASK)), "The tertiary orders should be different");
order1=ucol_next(iterator1, &status);
if (U_FAILURE(status)) {
@ -1304,7 +1302,7 @@ static void doOverrunTest(UCollator *coll, const UChar *uString, int32_t strLen)
skLen = ucol_getSortKey(coll, uString, strLen, NULL, 0);
for(i = 0; i < skLen; i++) {
memset(sortKey, filler, 256);
uprv_memset(sortKey, filler, 256);
skLen2 = ucol_getSortKey(coll, uString, strLen, sortKey, i);
if(skLen != skLen2) {
log_err("For buffer size %i, got different sortkey length. Expected %i got %i\n", i, skLen, skLen2);