ICU-4717 fix stack object initialization in init_resb_result - test
X-SVN-Rev: 18418
This commit is contained in:
parent
51bbb19d1f
commit
6115361760
@ -203,6 +203,8 @@ void addNEWResourceBundleTest(TestNode** root)
|
|||||||
addTest(root, &TestXPath, "tsutil/creststn/TestXPath");
|
addTest(root, &TestXPath, "tsutil/creststn/TestXPath");
|
||||||
addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases");
|
addTest(root, &TestCLDRStyleAliases, "tsutil/creststn/TestCLDRStyleAliases");
|
||||||
addTest(root, &TestFallbackCodes, "tsutil/creststn/TestFallbackCodes");
|
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(r);
|
||||||
ures_close(res);
|
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);
|
||||||
|
}
|
||||||
|
}
|
@ -62,6 +62,8 @@ static void TestJB3763(void);
|
|||||||
|
|
||||||
static void TestXPath(void);
|
static void TestXPath(void);
|
||||||
|
|
||||||
|
static void TestStackReuse(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* extensive subtests called by TestResourceBundles
|
* extensive subtests called by TestResourceBundles
|
||||||
**/
|
**/
|
||||||
|
Loading…
Reference in New Issue
Block a user