Skip to content

Commit 548b317

Browse files
committed
disable test_currencyPluralMinimumIntegerDigits
test_currencyPluralMinimumIntegerDigits does not and did never work on Ubuntu 14.04. In Swift 5 it works because a newer ICU is vendored which fixes the issue. But in Swift 4.2.x we don't vendor ICU so we can't get this test to work on Ubuntu 14.04, hence removing as it's no worse than Swift 4.2.3.
1 parent 3a40ed4 commit 548b317

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

TestFoundation/TestNumberFormatter.swift

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class TestNumberFormatter: XCTestCase {
3030
("test_scientificMinimumIntegerDigits", test_scientificMinimumIntegerDigits),
3131
("test_spellOutMinimumIntegerDigits", test_spellOutMinimumIntegerDigits),
3232
("test_ordinalMinimumIntegerDigits", test_ordinalMinimumIntegerDigits),
33-
("test_currencyPluralMinimumIntegerDigits", test_currencyPluralMinimumIntegerDigits),
3433
("test_currencyISOCodeMinimumIntegerDigits", test_currencyISOCodeMinimumIntegerDigits),
3534
("test_currencyAccountingMinimumIntegerDigits", test_currencyAccountingMinimumIntegerDigits),
3635
("test_maximumIntegerDigits", test_maximumIntegerDigits),
@@ -346,29 +345,6 @@ class TestNumberFormatter: XCTestCase {
346345
XCTAssertEqual(formatter2.string(from: 42), "42nd")
347346
}
348347

349-
func test_currencyPluralMinimumIntegerDigits() {
350-
// If .minimumIntegerDigits is set to 0 before .numberStyle change, preserve the value
351-
let formatter = NumberFormatter()
352-
XCTAssertEqual(formatter.minimumIntegerDigits, 0)
353-
formatter.minimumIntegerDigits = 0
354-
formatter.numberStyle = .currencyPlural
355-
XCTAssertEqual(formatter.minimumIntegerDigits, 0)
356-
formatter.locale = Locale(identifier: "en_US")
357-
XCTAssertEqual(formatter.string(from: 0), "0.00 US dollars")
358-
XCTAssertEqual(formatter.string(from: 1.23), "1.23 US dollars")
359-
XCTAssertEqual(formatter.string(from: 123.4), "123.40 US dollars")
360-
361-
// If .minimumIntegerDigits is not set before .numberStyle change, update the value
362-
let formatter2 = NumberFormatter()
363-
XCTAssertEqual(formatter2.minimumIntegerDigits, 0)
364-
formatter2.numberStyle = .currencyPlural
365-
XCTAssertEqual(formatter2.minimumIntegerDigits, 0)
366-
formatter2.locale = Locale(identifier: "en_US")
367-
XCTAssertEqual(formatter2.string(from: 0.01), "0.01 US dollars")
368-
XCTAssertEqual(formatter2.string(from: 1.234), "1.23 US dollars")
369-
XCTAssertEqual(formatter2.string(from: 123456.7), "123,456.70 US dollars")
370-
}
371-
372348
func test_currencyISOCodeMinimumIntegerDigits() {
373349
// If .minimumIntegerDigits is set to 0 before .numberStyle change, preserve the value
374350
let formatter = NumberFormatter()

0 commit comments

Comments
 (0)