Additional testing

This commit is contained in:
Cory Benfield committed 2020-07-05 17:11:02 +01:00
1 parent 49370cd8db
commit e6e0c68caf
8 files changed
+271 -32

No files matched your search

@@ -26,8 +26,16 @@ struct _StructuredHeaderCodingKey : CodingKey {
self.intValue = intValue
}
init<Key: CodingKey>(_ key: Key) {
self.stringValue = key.stringValue
init<Key: CodingKey>(_ key: Key, keyDecodingStrategy: StructuredFieldDecoder.KeyDecodingStrategy?) {
switch keyDecodingStrategy {
case .none:
self.stringValue = key.stringValue
case .some(.lowercase):
self.stringValue = key.stringValue.lowercased()
default:
preconditionFailure("Invalid key decoding strategy")
}
self.intValue = key.intValue
}
}