File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -543,20 +543,28 @@ final class EncodingTests: XCTestCase {
543543
544544 @UsesEncoding ( . lowercased)
545545 var name : String = " "
546+
547+ @UsesEncoding ( . arrayOf( . lowercased) )
548+ var hobbies : [ String ] = [ ]
546549 }
547550
548551 encoder. outputFormatting = . prettyPrinted
549552
550553 let user = User (
551554 id: UUID ( uuidString: " 3B0B3AFC-4C61-4251-8FC5-F046D06DC3EC " ) !,
552- name: " Joe Bloggs "
555+ name: " Joe Bloggs " ,
556+ hobbies: [ " Poker " , " Cycling " ]
553557 )
554558
555559 XCTAssertEqual (
556560 """
557561 {
558562 " id " : " 3b0b3afc-4c61-4251-8fc5-f046d06dc3ec " ,
559- " name " : " joe bloggs "
563+ " name " : " joe bloggs " ,
564+ " hobbies " : [
565+ " poker " ,
566+ " cycling "
567+ ]
560568 }
561569 """ ,
562570 stringValue ( try encoder. encode ( user) )
You can’t perform that action at this time.
0 commit comments