Skip to content

Commit e845d8a

Browse files
committed
currency: Update LongCurrencyFormatter to use bound currency
1 parent 82f29e9 commit e845d8a

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

  • components/experimental/src/dimension/currency

components/experimental/src/dimension/currency/format.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ mod tests {
4747
// Long
4848
let fmt_long = CurrencyFormatter::try_new_long(prefs, &currency_code).unwrap();
4949
assert_writeable_eq!(
50-
fmt_long.format_fixed_decimal(&positive_value, &currency_code),
50+
fmt_long.format_fixed_decimal(&positive_value),
5151
"12,345.67 US dollars"
5252
);
5353
assert_writeable_eq!(
54-
fmt_long.format_fixed_decimal(&negative_value, &currency_code),
54+
fmt_long.format_fixed_decimal(&negative_value),
5555
"-12,345.67 US dollars"
5656
);
5757
}
@@ -89,11 +89,11 @@ mod tests {
8989
// Long
9090
let fmt_long = CurrencyFormatter::try_new_long(prefs, &currency_code).unwrap();
9191
assert_writeable_eq!(
92-
fmt_long.format_fixed_decimal(&positive_value, &currency_code),
92+
fmt_long.format_fixed_decimal(&positive_value),
9393
"12\u{202f}345,67 euros"
9494
);
9595
assert_writeable_eq!(
96-
fmt_long.format_fixed_decimal(&negative_value, &currency_code),
96+
fmt_long.format_fixed_decimal(&negative_value),
9797
"-12\u{202f}345,67 euros"
9898
);
9999
}
@@ -135,11 +135,11 @@ mod tests {
135135
// Long
136136
let fmt_long = CurrencyFormatter::try_new_long(prefs, &currency_code).unwrap();
137137
assert_writeable_eq!(
138-
fmt_long.format_fixed_decimal(&positive_value, &currency_code),
138+
fmt_long.format_fixed_decimal(&positive_value),
139139
"١٢٬٣٤٥٫٦٧ جنيه مصري"
140140
);
141141
assert_writeable_eq!(
142-
fmt_long.format_fixed_decimal(&negative_value, &currency_code),
142+
fmt_long.format_fixed_decimal(&negative_value),
143143
"\u{61c}-١٢٬٣٤٥٫٦٧ جنيه مصري"
144144
);
145145
}
@@ -208,14 +208,14 @@ mod tests {
208208
// 5. Default numbering system (arab) - Long
209209
let fmt_arab_long = CurrencyFormatter::try_new_long(prefs_arab, &currency_code).unwrap();
210210
assert_writeable_eq!(
211-
fmt_arab_long.format_fixed_decimal(&value, &currency_code),
211+
fmt_arab_long.format_fixed_decimal(&value),
212212
"١٢٬٣٤٥٫٦٧ جنيه مصري"
213213
);
214214

215215
// 6. Locale extension override (latn) - Long
216216
let fmt_latn_long = CurrencyFormatter::try_new_long(prefs_latn, &currency_code).unwrap();
217217
assert_writeable_eq!(
218-
fmt_latn_long.format_fixed_decimal(&value, &currency_code),
218+
fmt_latn_long.format_fixed_decimal(&value),
219219
"12,345.67 جنيه مصري"
220220
);
221221
}

0 commit comments

Comments
 (0)