Skip to content

Commit 73c99ac

Browse files
committed
[test] Reinstate CoreGraphics↔︎NSValue bridging tests on iOS/watchOS/tvOS
1 parent 79bdd43 commit 73c99ac

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/stdlib/NSValueBridging.swift.gyb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ import StdlibUnittestFoundationExtras
2323
import Foundation
2424
import CoreGraphics
2525

26+
#if os(iOS) || os(tvOS) || os(watchOS)
27+
import UIKit
28+
#endif
29+
2630
var nsValueBridging = TestSuite("NSValueBridging")
2731

2832
func rangesEqual(_ x: NSRange, _ y: NSRange) -> Bool {
@@ -66,6 +70,16 @@ ${ testCase("CGAffineTransform", "CGAffineTransform(rotationAngle: .pi)", N
6670

6771
#endif
6872

73+
#if os(iOS) || os(tvOS) || os(watchOS)
74+
75+
${ testCase("CGRect", "CGRect(x: 17, y: 38, width: 6, height: 79)", "cgRect", "(==)") }
76+
${ testCase("CGPoint", "CGPoint(x: 17, y: 38)", "cgPoint", "(==)") }
77+
${ testCase("CGSize", "CGSize(width: 6, height: 79)", "cgSize", "(==)") }
78+
${ testCase("CGVector", "CGVector(dx: 6, dy: 79)", "cgVector", "(==)") }
79+
${ testCase("CGAffineTransform", "CGAffineTransform(rotationAngle: .pi)", "cgAffineTransform", "(==)") }
80+
81+
#endif
82+
6983
nsValueBridging.test("NSValue can only be cast back to its original type") {
7084
let range = NSRange(location: 17, length: 38)
7185
let rangeObject: Any = NSValue(range: range)

0 commit comments

Comments
 (0)