// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html /** * Copyright (c) 1999-2012, International Business Machines Corporation and * others. All Rights Reserved. * * Test for source/i18n/collunsafe.h */ #include #include "unicode/ucol.h" #include "unicode/uniset.h" #include "unicode/coll.h" #include "collation.h" #include "collunsafe.h" int main(int argc, const char *argv[]) { puts("verify"); UErrorCode errorCode = U_ZERO_ERROR; #if defined (COLLUNSAFE_PATTERN) puts("verify pattern"); const UnicodeString unsafeBackwardPattern(false, collunsafe_pattern, collunsafe_len); fprintf(stderr, "\n -- pat '%c%c%c%c%c'\n", collunsafe_pattern[0], collunsafe_pattern[1], collunsafe_pattern[2], collunsafe_pattern[3], collunsafe_pattern[4]); if(U_SUCCESS(errorCode)) { UnicodeSet us(unsafeBackwardPattern, errorCode); fprintf(stderr, "\n%s:%d: err creating set %s\n", __FILE__, __LINE__, u_errorName(errorCode)); } #endif #if defined (COLLUNSAFE_RANGE) { puts("verify range"); UnicodeSet u; for(int32_t i=0;i