File tree Expand file tree Collapse file tree 2 files changed +30
-24
lines changed Expand file tree Collapse file tree 2 files changed +30
-24
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ public struct Metadata: Sendable, Hashable {
170170 internal mutating func addValue( _ value: Value , forKey key: String ) {
171171 self . elements. append ( . init( key: key, value: value) )
172172 }
173-
173+
174174 /// Add the contents of a `Sequence` of key-value pairs to this `Metadata` instance.
175175 ///
176176 /// - Parameter other: the `Sequence` whose key-value pairs should be added into this `Metadata` instance.
Original file line number Diff line number Diff line change @@ -270,42 +270,48 @@ struct MetadataTests {
270270 self . otherMetadata. addString ( " value1-2 " , forKey: " key1 " )
271271 self . metadata. add ( contentsOf: self . otherMetadata)
272272
273- #expect( self . metadata == [
274- " key1 " : " value1-1 " ,
275- " key2 " : " value2 " ,
276- " key3 " : " value3 " ,
277- " key4 " : " value4 " ,
278- " key5 " : " value5 " ,
279- " key1 " : " value1-2 " ,
280- ] )
273+ #expect(
274+ self . metadata == [
275+ " key1 " : " value1-1 " ,
276+ " key2 " : " value2 " ,
277+ " key3 " : " value3 " ,
278+ " key4 " : " value4 " ,
279+ " key5 " : " value5 " ,
280+ " key1 " : " value1-2 " ,
281+ ]
282+ )
281283 }
282284
283285 @Test ( " Where key is already present with same value " )
284286 mutating func mergeWhereKeyIsAlreadyPresentWithSameValue( ) async throws {
285287 self . otherMetadata. addString ( " value1-1 " , forKey: " key1 " )
286288 self . metadata. add ( contentsOf: self . otherMetadata)
287289
288- #expect( self . metadata == [
289- " key1 " : " value1-1 " ,
290- " key2 " : " value2 " ,
291- " key3 " : " value3 " ,
292- " key4 " : " value4 " ,
293- " key5 " : " value5 " ,
294- " key1 " : " value1-1 " ,
295- ] )
290+ #expect(
291+ self . metadata == [
292+ " key1 " : " value1-1 " ,
293+ " key2 " : " value2 " ,
294+ " key3 " : " value3 " ,
295+ " key4 " : " value4 " ,
296+ " key5 " : " value5 " ,
297+ " key1 " : " value1-1 " ,
298+ ]
299+ )
296300 }
297301
298302 @Test ( " Where key is not already present " )
299303 mutating func mergeWhereKeyIsNotAlreadyPresent( ) async throws {
300304 self . metadata. add ( contentsOf: self . otherMetadata)
301305
302- #expect( self . metadata == [
303- " key1 " : " value1-1 " ,
304- " key2 " : " value2 " ,
305- " key3 " : " value3 " ,
306- " key4 " : " value4 " ,
307- " key5 " : " value5 "
308- ] )
306+ #expect(
307+ self . metadata == [
308+ " key1 " : " value1-1 " ,
309+ " key2 " : " value2 " ,
310+ " key3 " : " value3 " ,
311+ " key4 " : " value4 " ,
312+ " key5 " : " value5 " ,
313+ ]
314+ )
309315 }
310316 }
311317}
You can’t perform that action at this time.
0 commit comments