added a Test

This commit is contained in:
Peter Schumacher 2016-08-30 09:08:37 +02:00
parent a07ead5c8c
commit d995bd134e
1 changed files with 18 additions and 0 deletions

View File

@ -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()