diff --git a/Tests/FoundationInternationalizationTests/Formatting/DateFormatStyleTests.swift b/Tests/FoundationInternationalizationTests/Formatting/DateFormatStyleTests.swift index d12c1ba5f..bf5602477 100644 --- a/Tests/FoundationInternationalizationTests/Formatting/DateFormatStyleTests.swift +++ b/Tests/FoundationInternationalizationTests/Formatting/DateFormatStyleTests.swift @@ -192,23 +192,23 @@ private struct DateFormatStyleTests { let locale = Locale(identifier: "es_ES") await usingCurrentInternationalizationPreferences { #expect(date.formatted(date: .long, time: .complete) == date.formatted(Date.FormatStyle(date: .long, time: .complete))) - } - #expect( - date.formatted( - .dateTime - .day() - .month() - .year() - .locale(locale) - ) == - date.formatted( - Date.FormatStyle() - .day() - .month() - .year() - .locale(locale) + #expect( + date.formatted( + .dateTime + .day() + .month() + .year() + .locale(locale) + ) == + date.formatted( + Date.FormatStyle() + .day() + .month() + .year() + .locale(locale) + ) ) - ) + } } @Test func dateFormatStyleIndividualFields() { diff --git a/Tests/FoundationInternationalizationTests/Formatting/DateIntervalFormatStyleTests.swift b/Tests/FoundationInternationalizationTests/Formatting/DateIntervalFormatStyleTests.swift index a7c6ad3f8..7a29bcab0 100644 --- a/Tests/FoundationInternationalizationTests/Formatting/DateIntervalFormatStyleTests.swift +++ b/Tests/FoundationInternationalizationTests/Formatting/DateIntervalFormatStyleTests.swift @@ -106,9 +106,9 @@ private struct DateIntervalFormatStyleTests { // This test assumes both the left side and the right side of the comparison has the same `Locale.autoupdatingCurrent`, which assumes the state of the host machine remains unchanged. #expect(range.formatted() == Date.IntervalFormatStyle().format(range)) #expect(range.formatted(date: .numeric, time: .shortened) == Date.IntervalFormatStyle(date: .numeric, time: .shortened).format(range)) + #expect(range.formatted(.interval.day().month().year().locale(locale)) == Date.IntervalFormatStyle().day().month().year().locale(locale).format(range)) } - #expect(range.formatted(.interval.day().month().year().locale(locale)) == Date.IntervalFormatStyle().day().month().year().locale(locale).format(range)) } #if FIXED_ICU_74_DAYPERIOD