1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-11 05:05:23 +03:00

#587 add CombineAnimationTests and NodeBoundsTests for OSX

This commit is contained in:
Daniil Manin 2019-06-03 19:57:24 +07:00
parent 245002f81c
commit 95e842b311
2 changed files with 17 additions and 13 deletions

View File

@ -6,24 +6,28 @@
// Copyright © 2017 Exyte. All rights reserved.
//
#if os(iOS)
import XCTest
#if os(OSX)
@testable import MacawOSX
#endif
#if os(iOS)
@testable import Macaw
#endif
class CombineAnimationTests: XCTestCase {
var testView: MacawView!
var testGroup: Group!
var window: UIWindow!
var window: MWindow!
override func setUp() {
super.setUp()
testGroup = [Shape(form:Rect(x: 0.0, y: 0.0, w: 0.0, h: 0.0))].group()
testView = MacawView(node: testGroup, frame: CGRect.zero)
testView = MacawView(node: testGroup, frame: .zero)
window = UIWindow()
window = MWindow()
window.addSubview(testView)
}
@ -98,5 +102,3 @@ class CombineAnimationTests: XCTestCase {
}
}
#endif

View File

@ -6,13 +6,17 @@
// Copyright © 2017 Exyte. All rights reserved.
//
#if os(iOS)
import XCTest
#if os(OSX)
@testable import MacawOSX
#endif
#if os(iOS)
@testable import Macaw
#endif
class NodeBoundsTests: XCTestCase {
var window: UIWindow!
var window: MWindow!
//TO DO: need to test paths bounds: M 50 50 C 20 20, 40 20, 50 10 and M 50 50 c 20 20, 40 20, 50 10
//currently doesn't work because of http://www.openradar.me/6468254639 or #41355347 on https://bugreport.apple.com/
@ -20,7 +24,7 @@ class NodeBoundsTests: XCTestCase {
override func setUp() {
super.setUp()
window = UIWindow()
window = MWindow()
}
override func tearDown() {
@ -317,5 +321,3 @@ class NodeBoundsTests: XCTestCase {
validate(node: shape, referenceBounds: targetRect)
}
}
#endif