     }
 
     func test_NSOffsetRect() {
-        let r1 = NSRect(x: CGFloat(1.2), y: CGFloat(3.1), width: CGFloat(10.0), height: CGFloat(10.0))
+        let r1 = NSMakeRect(CGFloat(1.2), CGFloat(3.1), CGFloat(10.0), CGFloat(10.0))
         let r2 = NSOffsetRect(r1, CGFloat(2.0), CGFloat(-5.0))
-        let expectedRect = NSRect(x: CGFloat(3.2), y: CGFloat(-1.9), width: CGFloat(10.0), height: CGFloat(10.0))
+        let expectedRect = NSMakeRect(CGFloat(3.2), CGFloat(-1.9), CGFloat(10.0), CGFloat(10.0))
         
         XCTAssertTrue(_NSRect(expectedRect, equalsToRect: r2))
     }
 
     func test_NSPointInRect() {
-        let p1 = NSPoint(x: CGFloat(2.2), y: CGFloat(5.3))
-        let p2 = NSPoint(x: CGFloat(1.2), y: CGFloat(3.1))
-        let p3 = NSPoint(x: CGFloat(1.2), y: CGFloat(5.3))
-        let p4 = NSPoint(x: CGFloat(5.2), y: CGFloat(3.1))
-        let p5 = NSPoint(x: CGFloat(11.2), y: CGFloat(13.1))
-        let r1 = NSRect(x: CGFloat(1.2), y: CGFloat(3.1), width: CGFloat(10.0), height: CGFloat(10.0))
-        let r2 = NSRect(x: CGFloat(-2.3), y: CGFloat(-1.5), width: CGFloat(1.0), height: CGFloat(1.0))
-
-        XCTAssertFalse(NSRect.zero.contains(NSPoint.zero))
-        XCTAssertFalse(r2.contains(p1))
-        XCTAssertTrue(r1.contains(p1))
-        XCTAssertTrue(r1.contains(p2))
-        XCTAssertTrue(r1.contains(p3))
-        XCTAssertTrue(r1.contains(p4))
-        XCTAssertFalse(r1.contains(p5))
+        let p1 = NSMakePoint(CGFloat(2.2), CGFloat(5.3))
+        let p2 = NSMakePoint(CGFloat(1.2), CGFloat(3.1))
+        let p3 = NSMakePoint(CGFloat(1.2), CGFloat(5.3))
+        let p4 = NSMakePoint(CGFloat(5.2), CGFloat(3.1))
+        let p5 = NSMakePoint(CGFloat(11.2), CGFloat(13.1))
+        let r1 = NSMakeRect(CGFloat(1.2), CGFloat(3.1), CGFloat(10.0), CGFloat(10.0))
+        let r2 = NSMakeRect(CGFloat(-2.3), CGFloat(-1.5), CGFloat(1.0), CGFloat(1.0))
+
+        XCTAssertFalse(NSPointInRect(NSZeroPoint, NSZeroRect))
+        XCTAssertFalse(NSPointInRect(p1, r2))
+        XCTAssertTrue(NSPointInRect(p1, r1))
+        XCTAssertTrue(NSPointInRect(p2, r1))
+        XCTAssertTrue(NSPointInRect(p3, r1))
+        XCTAssertTrue(NSPointInRect(p4, r1))
+        XCTAssertFalse(NSPointInRect(p5, r1))
     }
 
     func test_NSMouseInRect() {
-        let p1 = NSPoint(x: CGFloat(2.2), y: CGFloat(5.3))
-        let r1 = NSRect(x: CGFloat(1.2), y: CGFloat(3.1), width: CGFloat(10.0), height: CGFloat(10.0))
-        let r2 = NSRect(x: CGFloat(-2.3), y: CGFloat(-1.5), width: CGFloat(1.0), height: CGFloat(1.0))
-
-        XCTAssertFalse(NSMouseInRect(NSPoint.zero, NSRect.zero, true))
+        let p1 = NSMakePoint(CGFloat(2.2), CGFloat(5.3))
+        let r1 = NSMakeRect(CGFloat(1.2), CGFloat(3.1), CGFloat(10.0), CGFloat(10.0))
+        let r2 = NSMakeRect(CGFloat(-2.3), CGFloat(-1.5), CGFloat(1.0), CGFloat(1.0))
+
+        XCTAssertFalse(NSMouseInRect(NSZeroPoint, NSZeroRect, true))
         XCTAssertFalse(NSMouseInRect(p1, r2, true))
         XCTAssertTrue(NSMouseInRect(p1, r1, true))
 
-        let p2 = NSPoint(x: r1.minX, y: r1.maxY)
+        let p2 = NSMakePoint(NSMinX(r1), NSMaxY(r1))
         XCTAssertFalse(NSMouseInRect(p2, r1, true))
         XCTAssertTrue(NSMouseInRect(p2, r1, false))
 
-        let p3 = NSPoint(x: r1.minX, y: r1.minY)
+        let p3 = NSMakePoint(NSMinX(r1), NSMinY(r1))
         XCTAssertFalse(NSMouseInRect(p3, r1, false))
         XCTAssertTrue(NSMouseInRect(p3, r1, true))
     }
 
     func test_NSContainsRect() {
-        let r1 = NSRect(x: CGFloat(1.2), y: CGFloat(3.1), width: CGFloat(10.0), height: CGFloat(10.0))
-        let r2 = NSRect(x: CGFloat(-2.3), y: CGFloat(-1.5), width: CGFloat(1.0), height: CGFloat(1.0))
-        let r3 = NSRect(x: CGFloat(10.2), y: CGFloat(5.5), width: CGFloat(0.5), height: CGFloat(5.0))
-
-        XCTAssertFalse(r1.contains(NSRect.zero))
-        XCTAssertFalse(r1.contains(r2))
-        XCTAssertFalse(r2.contains(r1))
-        XCTAssertTrue(r1.contains(r3))
+        let r1 = NSMakeRect(CGFloat(1.2), CGFloat(3.1), CGFloat(10.0), CGFloat(10.0))
+        let r2 = NSMakeRect(CGFloat(-2.3), CGFloat(-1.5), CGFloat(1.0), CGFloat(1.0))
+        let r3 = NSMakeRect(CGFloat(10.2), CGFloat(5.5), CGFloat(0.5), CGFloat(5.0))
+
+        XCTAssertFalse(NSContainsRect(r1, NSZeroRect))
+        XCTAssertFalse(NSContainsRect(r1, r2))
+        XCTAssertFalse(NSContainsRect(r2, r1))
+        XCTAssertTrue(NSContainsRect(r1, r3))
     }
 
     func test_NSIntersectsRect() {
-        let r1 = NSRect(x: CGFloat(1.2), y: CGFloat(3.1), width: CGFloat(10.0), height: CGFloat(10.0))
-        let r2 = NSRect(x: CGFloat(-2.3), y: CGFloat(-1.5), width: CGFloat(1.0), height: CGFloat(1.0))
-        let r3 = NSRect(x: CGFloat(10.2), y: CGFloat(2.5), width: CGFloat(5.0), height: CGFloat(5.0))
-
-        XCTAssertFalse(NSRect.zero.intersects(NSRect.zero))
-        XCTAssertFalse(r1.intersects(NSRect.zero))
-        XCTAssertFalse(NSRect.zero.intersects(r2))
-        XCTAssertFalse(r1.intersects(r2))
-        XCTAssertTrue(r1.intersects(r3))
+        let r1 = NSMakeRect(CGFloat(1.2), CGFloat(3.1), CGFloat(10.0), CGFloat(10.0))
+        let r2 = NSMakeRect(CGFloat(-2.3), CGFloat(-1.5), CGFloat(1.0), CGFloat(1.0))
+        let r3 = NSMakeRect(CGFloat(10.2), CGFloat(2.5), CGFloat(5.0), CGFloat(5.0))
+
+        XCTAssertFalse(NSIntersectsRect(NSZeroRect, NSZeroRect))
+        XCTAssertFalse(NSIntersectsRect(r1, NSZeroRect))
+        XCTAssertFalse(NSIntersectsRect(NSZeroRect, r2))
+        XCTAssertFalse(NSIntersectsRect(r1, r2))
+        XCTAssertTrue(NSIntersectsRect(r1, r3))
     }
 
     func test_NSIntegralRect() {
-        let referenceNegativeRect = NSRect(x: CGFloat(-0.6), y: CGFloat(-5.4), width: CGFloat(-105.7), height: CGFloat(-24.3))
-        XCTAssertEqual(referenceNegativeRect.integral, NSRect.zero)
-
-        
-        let referenceRect = NSRect(x: CGFloat(0.6), y: CGFloat(5.4), width: CGFloat(105.7), height: CGFloat(24.3))
-        let referenceNegativeOriginRect = NSRect(x: CGFloat(-0.6), y: CGFloat(-5.4), width: CGFloat(105.7), height: CGFloat(24.3))
-        
-        var expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(5.0), width: CGFloat(107.0), height: CGFloat(25.0))
-        var result = referenceRect.integral
-        XCTAssertEqual(result, expectedResult)
-
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-6.0), width: CGFloat(107.0), height: CGFloat(25.0))
-        result = referenceNegativeOriginRect.integral
+        let referenceNegativeRect = NSMakeRect(CGFloat(-0.6), CGFloat(-5.4), CGFloat(-105.7), CGFloat(-24.3))
+        XCTAssertEqual(NSIntegralRect(referenceNegativeRect), NSZeroRect)
+
+        
+        let referenceRect = NSMakeRect(CGFloat(0.6), CGFloat(5.4), CGFloat(105.7), CGFloat(24.3))
+        let referenceNegativeOriginRect = NSMakeRect(CGFloat(-0.6), CGFloat(-5.4), CGFloat(105.7), CGFloat(24.3))
+        
+        var expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(5.0), CGFloat(107.0), CGFloat(25.0))
+        var result = NSIntegralRect(referenceRect)
+        XCTAssertEqual(result, expectedResult)
+
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-6.0), CGFloat(107.0), CGFloat(25.0))
+        result = NSIntegralRect(referenceNegativeOriginRect)
         XCTAssertEqual(result, expectedResult)
     
     }
     
     func test_NSIntegralRectWithOptions() {
-        let referenceRect = NSRect(x: CGFloat(0.6), y: CGFloat(5.4), width: CGFloat(105.7), height: CGFloat(24.3))
-        let referenceNegativeRect = NSRect(x: CGFloat(-0.6), y: CGFloat(-5.4), width: CGFloat(-105.7), height: CGFloat(-24.3))
-        let referenceNegativeOriginRect = NSRect(x: CGFloat(-0.6), y: CGFloat(-5.4), width: CGFloat(105.7), height: CGFloat(24.3))
+        let referenceRect = NSMakeRect(CGFloat(0.6), CGFloat(5.4), CGFloat(105.7), CGFloat(24.3))
+        let referenceNegativeRect = NSMakeRect(CGFloat(-0.6), CGFloat(-5.4), CGFloat(-105.7), CGFloat(-24.3))
+        let referenceNegativeOriginRect = NSMakeRect(CGFloat(-0.6), CGFloat(-5.4), CGFloat(105.7), CGFloat(24.3))
 
         var options: AlignmentOptions = [.alignMinXInward, .alignMinYInward, .alignHeightInward, .alignWidthInward]
-        var expectedResult = NSRect(x: CGFloat(1.0), y: CGFloat(6.0), width: CGFloat(105.0), height: CGFloat(24.0))
+        var expectedResult = NSMakeRect(CGFloat(1.0), CGFloat(6.0), CGFloat(105.0), CGFloat(24.0))
         var result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXOutward, .alignMinYOutward, .alignHeightOutward, .alignWidthOutward]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(5.0), width: CGFloat(106.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(5.0), CGFloat(106.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXInward, .alignMinYInward, .alignHeightInward, .alignWidthInward]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(-5.0), width: CGFloat(0.0), height: CGFloat(0.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(-5.0), CGFloat(0.0), CGFloat(0.0))
         result = NSIntegralRectWithOptions(referenceNegativeRect, options)
         XCTAssertEqual(result, expectedResult)
         
         options = [.alignMinXInward, .alignMinYInward, .alignHeightInward, .alignWidthInward]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(-5.0), width: CGFloat(105.0), height: CGFloat(24.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(-5.0), CGFloat(105.0), CGFloat(24.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXOutward, .alignMinYOutward, .alignHeightOutward, .alignWidthOutward]
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-6.0), width: CGFloat(106.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-6.0), CGFloat(106.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMaxXOutward, .alignMaxYOutward, .alignHeightOutward, .alignWidthOutward]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(-6.0), width: CGFloat(106.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(-6.0), CGFloat(106.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXOutward, .alignMaxXOutward, .alignMinYOutward, .alignMaxYOutward]
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-6.0), width: CGFloat(107.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-6.0), CGFloat(107.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMaxXOutward, .alignMaxYOutward, .alignHeightOutward, .alignWidthOutward]
-        expectedResult = NSRect(x: CGFloat(1.0), y: CGFloat(5.0), width: CGFloat(106.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(1.0), CGFloat(5.0), CGFloat(106.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMaxXInward, .alignMaxYInward, .alignHeightOutward, .alignWidthOutward]
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-7.0), width: CGFloat(106.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-7.0), CGFloat(106.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMaxXInward, .alignMaxYInward, .alignHeightOutward, .alignWidthOutward]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(4.0), width: CGFloat(106.0), height: CGFloat(25.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(4.0), CGFloat(106.0), CGFloat(25.0))
         result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXNearest, .alignMinYNearest, .alignHeightNearest, .alignWidthNearest]
-        expectedResult = NSRect(x: CGFloat(1.0), y: CGFloat(5.0), width: CGFloat(106.0), height: CGFloat(24.0))
+        expectedResult = NSMakeRect(CGFloat(1.0), CGFloat(5.0), CGFloat(106.0), CGFloat(24.0))
         result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
         
         options = [.alignMinXNearest, .alignMinYNearest, .alignHeightNearest, .alignWidthNearest]
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-5.0), width: CGFloat(106.0), height: CGFloat(24.0))
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-5.0), CGFloat(106.0), CGFloat(24.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMaxXNearest, .alignMaxYNearest, .alignHeightNearest, .alignWidthNearest]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(6.0), width: CGFloat(106.0), height: CGFloat(24.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(6.0), CGFloat(106.0), CGFloat(24.0))
         result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
         
         options = [.alignMaxXNearest, .alignMaxYNearest, .alignHeightNearest, .alignWidthNearest]
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-5.0), width: CGFloat(106.0), height: CGFloat(24.0))
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-5.0), CGFloat(106.0), CGFloat(24.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXInward, .alignMaxXInward, .alignMinYInward, .alignMaxYInward]
-        expectedResult = NSRect(x: CGFloat(1.0), y: CGFloat(6.0), width: CGFloat(105.0), height: CGFloat(23.0))
+        expectedResult = NSMakeRect(CGFloat(1.0), CGFloat(6.0), CGFloat(105.0), CGFloat(23.0))
         result = NSIntegralRectWithOptions(referenceRect, options)
         XCTAssertEqual(result, expectedResult)
         
         options = [.alignMinXInward, .alignMaxXInward, .alignMinYInward, .alignMaxYInward]
-        expectedResult = NSRect(x: CGFloat(0.0), y: CGFloat(-5.0), width: CGFloat(105.0), height: CGFloat(23.0))
+        expectedResult = NSMakeRect(CGFloat(0.0), CGFloat(-5.0), CGFloat(105.0), CGFloat(23.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
 
         options = [.alignMinXNearest, .alignMaxXInward, .alignMinYInward, .alignMaxYNearest]
-        expectedResult = NSRect(x: CGFloat(-1.0), y: CGFloat(-5.0), width: CGFloat(106.0), height: CGFloat(24.0))
+        expectedResult = NSMakeRect(CGFloat(-1.0), CGFloat(-5.0), CGFloat(106.0), CGFloat(24.0))
         result = NSIntegralRectWithOptions(referenceNegativeOriginRect, options)
         XCTAssertEqual(result, expectedResult)
     }

    }
    
    func test_EncodeNegativeToNSString() {
        let referenceNegativeRect = NSRect(x: CGFloat(-0.6), y: CGFloat(-5.4), width: CGFloat(-105.7), height: CGFloat(-24.3))
        
        var expectedString = "{-0.6, -5.4}"
        var string = NSStringFromPoint(referenceNegativeRect.origin)

        let stringSize = "{-105.7, -24.3}"
        let stringRect = "{{-0.6, -5.4}, {-105.7, -24.3}}"
        
        let expectedPoint = NSMakePoint(CGFloat(-0.6), CGFloat(-5.4))
        let point = NSPointFromString(stringPoint)
        XCTAssertTrue(_NSPoint(expectedPoint, equalsToPoint: point),
            "\(NSStringFromPoint(point)) is not equal to expected \(NSStringFromPoint(expectedPoint))")
        
        let expectedSize = NSMakeSize(CGFloat(-105.7), CGFloat(-24.3))
        let size = NSSizeFromString(stringSize)
        XCTAssertTrue(_NSSize(expectedSize, equalsToSize: size),
                       "\(NSStringFromSize(size)) is not equal to expected \(NSStringFromSize(expectedSize))")
        
        let expectedRect = NSMakeRect(CGFloat(-0.6), CGFloat(-5.4), CGFloat(-105.7), CGFloat(-24.3))
        let rect = NSRectFromString(stringRect)
        XCTAssertTrue(_NSRect(expectedRect, equalsToRect: rect),
                       "\(NSStringFromRect(rect)) is not equal to expected \(NSStringFromRect(expectedRect))")
