@@ -75,11 +75,12 @@ class TestCharacterSet : XCTestCase {
75
75
( " test_Planes " , test_Planes) ,
76
76
( " test_InlineBuffer " , test_InlineBuffer) ,
77
77
( " test_Equatable " , test_Equatable) ,
78
- // The following tests must remain disabled until SR-2509 is resolved.
79
78
( " test_Subtracting " , test_Subtracting) ,
80
79
( " test_SubtractEmptySet " , test_SubtractEmptySet) ,
81
80
( " test_SubtractNonEmptySet " , test_SubtractNonEmptySet) ,
82
81
( " test_SymmetricDifference " , test_SymmetricDifference) ,
82
+ ( " test_formUnion " , test_formUnion) ,
83
+ ( " test_union " , test_union) ,
83
84
]
84
85
}
85
86
@@ -353,4 +354,16 @@ class TestCharacterSet : XCTestCase {
353
354
XCTAssertNotEqual ( Box . alphanumerics, Box . decimalDigits)
354
355
}
355
356
357
+ func test_formUnion( ) {
358
+ var charset = CharacterSet ( charactersIn: " a " )
359
+ charset. formUnion ( CharacterSet ( charactersIn: " A " ) )
360
+ XCTAssertTrue ( charset. contains ( " A " as UnicodeScalar ) )
361
+ }
362
+
363
+ func test_union( ) {
364
+ let charset = CharacterSet ( charactersIn: " a " )
365
+ let union = charset. union ( CharacterSet ( charactersIn: " A " ) )
366
+ XCTAssertTrue ( union. contains ( " A " as UnicodeScalar ) )
367
+ }
368
+
356
369
}
0 commit comments