ICU-10131 Add test for fallback prevention with empty set for JAVA.

X-SVN-Rev: 33754
This commit is contained in:
Travis Keep 2013-05-25 00:03:37 +00:00
parent cb0f19fc45
commit e29ab729e8
2 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2dd62bbd4ef0fe4b89295bffdb22c67e718effb1ada3a5e28e516b7e3576adec
size 724514
oid sha256:afe332a33bed44b1fe7ae0665c82cbd68f6fac9d83dedf1d03a84780f021c56a
size 724582

View file

@ -630,6 +630,20 @@ public final class ICUResourceBundleTest extends TestFmwk {
warnln("could not load resource data: " + ex.getMessage());
}
}
public void TestPreventFallback() {
String noFallbackResource = "string_in_te_no_te_IN_fallback";
ICUResourceBundle rb = (ICUResourceBundle) UResourceBundle.getBundleInstance("com/ibm/icu/dev/data/testdata","te_IN_NE",testLoader);
try {
rb.getStringWithFallback(noFallbackResource);
fail("Expected MissingResourceException.");
} catch (MissingResourceException e) {
// Expected
}
rb.getStringWithFallback("string_only_in_te");
rb = (ICUResourceBundle) UResourceBundle.getBundleInstance("com/ibm/icu/dev/data/testdata","te",testLoader);
rb.getStringWithFallback(noFallbackResource);
}
public void TestGetWithFallback(){
/*