@@ -242,20 +242,22 @@ private struct NumberFormatStyleTests {
242242 }
243243
244244 @Test func formattedAttributedLeadingDotSyntax( ) throws {
245+ let locale = Locale ( identifier: " fr_FR " )
245246 let int = 42
246- #expect( int. formatted ( . number. attributed) == IntegerFormatStyle ( ) . attributed. format ( int) )
247- #expect( int. formatted ( . percent. attributed) == IntegerFormatStyle . Percent ( ) . attributed. format ( int) )
248- #expect( int. formatted ( . currency( code: " GBP " ) . attributed) == IntegerFormatStyle . Currency ( code: " GBP " ) . attributed. format ( int) )
247+ #expect( int. formatted ( . number. attributed. locale ( locale ) ) == IntegerFormatStyle ( ) . attributed. locale ( locale ) . format ( int) )
248+ #expect( int. formatted ( . percent. attributed. locale ( locale ) ) == IntegerFormatStyle . Percent ( ) . attributed. locale ( locale ) . format ( int) )
249+ #expect( int. formatted ( . currency( code: " GBP " ) . attributed. locale ( locale ) ) == IntegerFormatStyle . Currency ( code: " GBP " ) . attributed. locale ( locale ) . format ( int) )
249250
250251 let float = 3.14159
251- #expect( float. formatted ( . number. attributed) == FloatingPointFormatStyle < Double > ( ) . attributed. format ( float) )
252- #expect( float. formatted ( . percent. attributed) == FloatingPointFormatStyle . Percent ( ) . attributed. format ( float) )
253- #expect( float. formatted ( . currency( code: " GBP " ) . attributed) == FloatingPointFormatStyle . Currency ( code: " GBP " ) . attributed. format ( float) )
252+ #expect( float. formatted ( . number. attributed. locale ( locale ) ) == FloatingPointFormatStyle < Double > ( ) . attributed. locale ( locale ) . format ( float) )
253+ #expect( float. formatted ( . percent. attributed. locale ( locale ) ) == FloatingPointFormatStyle . Percent ( ) . attributed. locale ( locale ) . format ( float) )
254+ #expect( float. formatted ( . currency( code: " GBP " ) . attributed. locale ( locale ) ) == FloatingPointFormatStyle . Currency ( code: " GBP " ) . attributed. locale ( locale ) . format ( float) )
254255
255256 let decimal = Decimal ( 2.999 )
256- #expect( decimal. formatted ( . number. attributed) == Decimal . FormatStyle ( ) . attributed. format ( decimal) )
257- #expect( decimal. formatted ( . percent. attributed) == Decimal . FormatStyle. Percent ( ) . attributed. format ( decimal) )
258- #expect( decimal. formatted ( . currency( code: " GBP " ) . attributed) == Decimal . FormatStyle. Currency ( code: " GBP " ) . attributed. format ( decimal) )
257+ #expect( decimal. formatted ( . number. attributed. locale ( locale) ) == Decimal . FormatStyle ( ) . attributed. locale ( locale) . format ( decimal) )
258+ #expect( decimal. formatted ( . percent. attributed. locale ( locale) ) == Decimal . FormatStyle. Percent ( ) . attributed. locale ( locale) . format ( decimal) )
259+ #expect( decimal. formatted ( . currency( code: " GBP " ) . attributed. locale ( locale) ) == Decimal . FormatStyle. Currency ( code: " GBP " ) . attributed. locale ( locale) . format ( decimal) )
260+
259261 }
260262
261263 @Test func decimalFormatStyle( ) throws {
0 commit comments