/** * @tests java.text.DecimalFormatSymbols#hashCode() Test of method * java.text.DecimalFormatSymbols#hashCode(). */ @TestTargetNew( level = TestLevel.COMPLETE, notes = "", method = "hashCode", args = {}) @AndroidOnly("Succeeds against Android.") public void test_hashCode() { try { DecimalFormatSymbols dfs1 = new DecimalFormatSymbols(); DecimalFormatSymbols dfs2 = (DecimalFormatSymbols) dfs1.clone(); assertTrue("Hash codes of equal object are equal", dfs2.hashCode() == dfs1.hashCode()); dfs1.setInfinity("infinity_infinity"); assertTrue("Hash codes of non-equal objects are equal", dfs2.hashCode() != dfs1.hashCode()); } catch (Exception e) { fail("Unexpected exception " + e.toString()); } }