From d995bd134e33a9814ac1e4e1b84d0ac47068fad7 Mon Sep 17 00:00:00 2001 From: Peter Schumacher Date: Tue, 30 Aug 2016 09:08:37 +0200 Subject: [PATCH] added a Test --- Tests/Tests.swift | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Tests/Tests.swift b/Tests/Tests.swift index d317194..a368388 100644 --- a/Tests/Tests.swift +++ b/Tests/Tests.swift @@ -29,6 +29,24 @@ class SnapKitTests: XCTestCase { super.tearDown() } + @available(iOS 9.0, *) + func testReadableLayoutGuide() { + #if os(iOS) || os(tvOS) + let view = UIView(frame: CGRectMake(0, 0, 300, 300)) + + view.addSubview(self.container) + + let guide = view.readableContentGuide + + self.container.snp_makeConstraints { (make) -> Void in + make.top.equalTo(guide) + make.bottom.equalTo(guide) + } + print(view.snp_constraints) + XCTAssertEqual(view.snp_constraints.count, 12, "Should have 12 constraints installed") + #endif + } + func testLayoutGuideConstraints() { #if os(iOS) || os(tvOS) let vc = UIViewController()