/// <summary> /// Override equals. /// </summary> /// /// @stable ICU 2.0 public override bool Equals(Object obj) { if (obj == null) { return(false); } if ((Object)this == obj) { return(true); } DecimalFormatSymbols other = (DecimalFormatSymbols)obj; return(zeroDigit == other.zeroDigit && groupingSeparator == other.groupingSeparator && decimalSeparator == other.decimalSeparator && percent == other.percent && perMill == other.perMill && digit == other.digit && minusSign == other.minusSign && patternSeparator == other.patternSeparator && infinity.Equals(other.infinity) && NaN.Equals(other.NaN) && currencySymbol.Equals(other.currencySymbol) && intlCurrencySymbol.Equals(other.intlCurrencySymbol) && padEscape == other.padEscape && // [NEW] plusSign == other.plusSign && // [NEW] exponentSeparator.Equals(other.exponentSeparator) && // [NEW] monetarySeparator == other.monetarySeparator); }
public void TestDeprecatedCurrencyFormat() { // bug 5952 ILOG.J2CsMapping.Util.Locale locale = new ILOG.J2CsMapping.Util.Locale("sr", "QQ"); DecimalFormatSymbols icuSymbols = new IBM.ICU.Text.DecimalFormatSymbols( locale); String symbol = icuSymbols.GetCurrencySymbol(); Currency currency = icuSymbols.GetCurrency(); String expectCur = null; String expectSym = "\u00A4"; if (!symbol.ToString().Equals(expectSym) || currency != null) { Errln("for " + locale + " expected " + expectSym + "/" + expectCur + " but got " + symbol + "/" + currency); } else { Logln("for " + locale + " expected " + expectSym + "/" + expectCur + " and got " + symbol + "/" + currency); } }