/********************************************************************
* COPYRIGHT:
- * Copyright (c) 2009-2013, International Business Machines Corporation and
+ * Copyright (c) 2009-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/********************************************************************************
const char *dataSrcDir;
char *fileName;
char *confusables;
- int confusablesLength;
+ int confusablesLength = 0;
char *confusablesWholeScript;
- int confusablesWholeScriptLength;
+ int confusablesWholeScriptLength = 0;
FILE *f;
UParseError pe;
int32_t errType;
TEST_ASSERT_NE(f, NULL);
confusables = malloc(3000000);
if (f != NULL) {
- confusablesLength = fread(confusables, 1, 3000000, f);
- fclose(f);
+ confusablesLength = fread(confusables, 1, 3000000, f);
+ fclose(f);
}
strcpy(fileName, dataSrcDir);
TEST_ASSERT_NE(f, NULL);
confusablesWholeScript = malloc(1000000);
if (f != NULL) {
- confusablesWholeScriptLength = fread(confusablesWholeScript, 1, 1000000, f);
- fclose(f);
+ confusablesWholeScriptLength = fread(confusablesWholeScript, 1, 1000000, f);
+ fclose(f);
}
rsc = uspoof_openFromSource(confusables, confusablesLength,
status = U_ZERO_ERROR;
TEST_TEARDOWN;
+
+ /*
+ * get Inclusion and Recommended sets
+ */
+ TEST_SETUP
+ const USet *inclusions = NULL;
+ const USet *recommended = NULL;
+
+ inclusions = uspoof_getInclusionSet(&status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_EQ(TRUE, uset_isFrozen(inclusions));
+
+ status = U_ZERO_ERROR;
+ recommended = uspoof_getRecommendedSet(&status);
+ TEST_ASSERT_SUCCESS(status);
+ TEST_ASSERT_EQ(TRUE, uset_isFrozen(recommended));
+ TEST_TEARDOWN;
+
}
#endif /* UCONFIG_NO_REGULAR_EXPRESSIONS */