@@ -414,7 +414,9 @@ struct CommonStrategiesValueCoderTests {
414414 // Test encoding
415415 let encoder = JSONEncoder ( )
416416 encoder. outputFormatting = . sortedKeys
417- let encoded = try String ( data: encoder. encode ( status) , encoding: . utf8)
417+ let encoded = try String (
418+ data: encoder. encode ( status) , encoding: . utf8
419+ )
418420 #expect( encoded == #"{"since":"20250520","type":"active"}"# )
419421
420422 // Test decoding other cases with numeric values
@@ -425,7 +427,9 @@ struct CommonStrategiesValueCoderTests {
425427 }
426428 """
427429 let inactiveData = try #require( inactiveJson. data ( using: . utf8) )
428- let inactiveStatus = try decoder. decode ( Status . self, from: inactiveData)
430+ let inactiveStatus = try decoder. decode (
431+ Status . self, from: inactiveData
432+ )
429433 if case . inactive( let reason) = inactiveStatus {
430434 #expect( reason == " 404 " )
431435 } else {
@@ -440,7 +444,9 @@ struct CommonStrategiesValueCoderTests {
440444 }
441445 """
442446 let pendingData = try #require( pendingJson. data ( using: . utf8) )
443- let pendingStatus = try decoder. decode ( Status . self, from: pendingData)
447+ let pendingStatus = try decoder. decode (
448+ Status . self, from: pendingData
449+ )
444450 if case . pending( let until) = pendingStatus {
445451 #expect( until == " 20251231 " )
446452 } else {
@@ -553,16 +559,20 @@ struct CommonStrategiesValueCoderTests {
553559
554560 let jsonData = try #require( json. data ( using: . utf8) )
555561 let decoder = JSONDecoder ( )
556- let model = try decoder. decode ( ModelWithOverride . self, from: jsonData)
562+ let model = try decoder. decode (
563+ ModelWithOverride . self, from: jsonData
564+ )
557565
558- #expect( model. id == 42 ) // Due to CustomIntCoder doubling the value
559- #expect( model. count == 42 ) // Normal ValueCoder behavior
566+ #expect( model. id == 42 ) // Due to CustomIntCoder doubling the value
567+ #expect( model. count == 42 ) // Normal ValueCoder behavior
560568
561569 // Test encoding
562570 let encoder = JSONEncoder ( )
563571 encoder. outputFormatting = . sortedKeys
564- let encoded = try String ( data: encoder. encode ( model) , encoding: . utf8)
565- #expect( encoded == #"{"count":42,"id":"21"}"# ) // CustomIntCoder halves the value for id
572+ let encoded = try String (
573+ data: encoder. encode ( model) , encoding: . utf8
574+ )
575+ #expect( encoded == #"{"count":42,"id":"21"}"# ) // CustomIntCoder halves the value for id
566576 }
567577
568578 @Test
@@ -632,11 +642,11 @@ fileprivate struct CustomIntCoder: HelperCoder {
632642 debugDescription: " Could not decode value "
633643 )
634644 }
635- return intValue * 2 // Double the value during decoding
645+ return intValue * 2 // Double the value during decoding
636646 }
637647
638648 func encode( _ value: Int , to encoder: Encoder ) throws {
639649 var container = encoder. singleValueContainer ( )
640- try container. encode ( String ( value / 2 ) ) // Halve the value during encoding
650+ try container. encode ( String ( value / 2 ) ) // Halve the value during encoding
641651 }
642652}
0 commit comments