Skip to content

Commit 40f75b6

Browse files
committed
last 2
1 parent 491673d commit 40f75b6

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Tests/KeyValueDecoderTests.swift

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -895,24 +895,24 @@ struct KeyValueDecoderTests {
895895

896896
@Test()
897897
func decodingErrors() throws {
898-
// expectDecodingError(try KeyValueDecoder.decode(Seafood.self, from: 10)) { error in
899-
// #expect(error.debugDescription == "Expected String at SELF, found Int")
900-
// }
901-
// expectDecodingError(try KeyValueDecoder.decode(Int.self, from: NSNull())) { error in
902-
// #expect(error.debugDescription == "Expected BinaryInteger at SELF, found NSNull")
903-
// }
904-
// expectDecodingError(try KeyValueDecoder.decode(Int.self, from: Optional<Int>.none)) { error in
905-
// #expect(error.debugDescription == "Expected BinaryInteger at SELF, found nil")
906-
// }
907-
// expectDecodingError(try KeyValueDecoder.decode([Int].self, from: [0, 1, true] as [Any])) { error in
908-
// #expect(error.debugDescription == "Expected BinaryInteger at SELF[2], found Bool")
898+
expectDecodingError(try KeyValueDecoder.decode(Seafood.self, from: 10)) { error in
899+
#expect(error.debugDescription == "Expected String at SELF, found Int")
900+
}
901+
expectDecodingError(try KeyValueDecoder.decode(Int.self, from: NSNull())) { error in
902+
#expect(error.debugDescription == "Expected BinaryInteger at SELF, found NSNull")
903+
}
904+
expectDecodingError(try KeyValueDecoder.decode(Int.self, from: Optional<Int>.none)) { error in
905+
#expect(error.debugDescription == "Expected BinaryInteger at SELF, found nil")
906+
}
907+
expectDecodingError(try KeyValueDecoder.decode([Int].self, from: [0, 1, true] as [Any])) { error in
908+
#expect(error.debugDescription == "Expected BinaryInteger at SELF[2], found Bool")
909+
}
910+
// expectDecodingError(try KeyValueDecoder.decode(AllTypes.self, from: ["tArray": [["tString": 0]]] as [String: Any])) { error in
911+
// #expect(error.debugDescription == "Expected String at SELF.tArray[0].tString, found Int")
909912
// }
910913
// expectDecodingError(try KeyValueDecoder.decode(AllTypes.self, from: ["tArray": [["tString": 0]]] as [String: Any])) { error in
911914
// #expect(error.debugDescription == "Expected String at SELF.tArray[0].tString, found Int")
912915
// }
913-
expectDecodingError(try KeyValueDecoder.decode(AllTypes.self, from: ["tArray": [["tString": 0]]] as [String: Any])) { error in
914-
#expect(error.debugDescription == "Expected String at SELF.tArray[0].tString, found Int")
915-
}
916916
}
917917

918918
@Test

0 commit comments

Comments
 (0)