@@ -29,6 +29,7 @@ class TestNSGeometry : XCTestCase {
29
29
( " test_CGPoint_BasicConstruction " , test_CGPoint_BasicConstruction) ,
30
30
( " test_CGPoint_ExtendedConstruction " , test_CGPoint_ExtendedConstruction) ,
31
31
( " test_CGSize_BasicConstruction " , test_CGSize_BasicConstruction) ,
32
+ ( " test_CGSize_ExtendedConstruction " , test_CGSize_ExtendedConstruction) ,
32
33
( " test_CGRect_BasicConstruction " , test_CGRect_BasicConstruction) ,
33
34
( " test_NSEdgeInsets_BasicConstruction " , test_NSEdgeInsets_BasicConstruction) ,
34
35
( " test_NSEdgeInsetsEqual " , test_NSEdgeInsetsEqual) ,
@@ -137,6 +138,20 @@ class TestNSGeometry : XCTestCase {
137
138
XCTAssertEqual ( s2. width, CGFloat ( 3.6 ) )
138
139
XCTAssertEqual ( s2. height, CGFloat ( 4.5 ) )
139
140
}
141
+
142
+ func test_CGSize_ExtendedConstruction( ) {
143
+ let s1 = CGSize . zero
144
+ XCTAssertEqual ( s1. width, CGFloat ( 0 ) )
145
+ XCTAssertEqual ( s1. height, CGFloat ( 0 ) )
146
+
147
+ let s2 = CGSize ( width: Int ( 3 ) , height: Int ( 4 ) )
148
+ XCTAssertEqual ( s2. width, CGFloat ( 3 ) )
149
+ XCTAssertEqual ( s2. height, CGFloat ( 4 ) )
150
+
151
+ let s3 = CGSize ( width: Double ( 3.6 ) , height: Double ( 4.5 ) )
152
+ XCTAssertEqual ( s3. width, CGFloat ( 3.6 ) )
153
+ XCTAssertEqual ( s3. height, CGFloat ( 4.5 ) )
154
+ }
140
155
141
156
func test_CGRect_BasicConstruction( ) {
142
157
let r1 = CGRect ( )
0 commit comments