ICU-4717 fix stack object initialization in init_resb_result - test

X-SVN-Rev: 18418
This commit is contained in:
Vladimir Weinstein 2005-08-10 06:13:37 +00:00
parent 51bbb19d1f
commit 6115361760
2 changed files with 17 additions and 0 deletions

View File

@ -203,6 +203,8 @@ void addNEWResourceBundleTest(TestNode** root)
addTest(root, &TestXPath, "tsutil/creststn/TestXPath");
addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases");
addTest(root, &TestFallbackCodes, "tsutil/creststn/TestFallbackCodes");
addTest(root, &TestStackReuse, "tsutil/creststn/TestStackReuse");
}
@ -2685,3 +2687,16 @@ static void TestFallbackCodes(void) {
ures_close(r);
ures_close(res);
}
static void TestStackReuse(void) {
UResourceBundle table;
UErrorCode errorCode = U_ZERO_ERROR;
UResourceBundle *rb = ures_open(NULL, "en_US", &errorCode);
const char* tableKey = "Types";
const char* subTableKey = "collation";
ures_initStackObject(&table);
ures_getByKeyWithFallback(rb, tableKey, &table, &errorCode);
if (subTableKey != NULL) {
ures_getByKeyWithFallback(&table,subTableKey, &table, &errorCode);
}
}

View File

@ -62,6 +62,8 @@ static void TestJB3763(void);
static void TestXPath(void);
static void TestStackReuse(void);
/**
* extensive subtests called by TestResourceBundles
**/