     func testConstant_0() {
         let subject = View(frame: CGRect.zero)
         let subject2 = View(frame: CGRect.zero)
-        let constraint = NSLayoutConstraint(item: subject, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: subject2, attribute: NSLayoutAttribute.top, multiplier: 0.5, constant: 0.5)
+        let constraint = NSLayoutConstraint(item: subject, attribute: topLayoutAttribute, relatedBy: equalLayoutRelation, toItem: subject2, attribute: topLayoutAttribute, multiplier: 0.5, constant: 0.5)
         Observable.just(0).subscribe(constraint.rx.constant).dispose()
 
         XCTAssertTrue(constraint.constant == 0.0)

        let subject2 = View(frame: CGRect.zero)
        parent.addSubview(subject)
        parent.addSubview(subject2)
        let constraint = NSLayoutConstraint(item: subject, attribute: NSLayoutAttribute.top, relatedBy: NSLayoutRelation.equal, toItem: subject2, attribute: NSLayoutAttribute.top, multiplier: 0.5, constant: 0.5)
        Observable.just(false).subscribe(constraint.rx.active).dispose()

        XCTAssertTrue(constraint.isActive == false)

#if os(macOS)
import AppKit
typealias View = NSView
let topLayoutAttribute = NSLayoutConstraint.Attribute.top
let equalLayoutRelation = NSLayoutConstraint.Relation.equal
#else
import UIKit
typealias View = UIView
let topLayoutAttribute = NSLayoutAttribute.top
let equalLayoutRelation = NSLayoutRelation.equal
#endif

final class NSLayoutConstraintTest : RxTest {
