                 height: maxHeight
                     - l3.verticalMargins))
     }
-    
-    func testHorizontalReversedMatchParent() {
-        l1 = TestLayoutable(sideLength: 30, layoutModes: BayaLayoutOptions.Modes(width: .matchParent, height: .matchParent))
-        l2 = TestLayoutable(sideLength: 60, layoutModes: BayaLayoutOptions.Modes(width: .matchParent, height: .matchParent))
-        l3 = TestLayoutable(sideLength: 90, layoutModes: BayaLayoutOptions.Modes(width: .matchParent, height: .matchParent))
-        var layout = [l1, l2, l3].layoutLinearly(
-            orientation: .horizontal,
-            direction: .reversed,
-            spacing: spacing)
-        layout.startLayout(with: layoutRect)
-        let maxHeight = max(
-            l1.height + l1.verticalMargins,
-            l2.height + l2.verticalMargins,
-            l3.height + l3.verticalMargins)
-        
-        XCTAssertEqual(
-            l3.frame,
-            CGRect(
-                x: layoutRect.minX
-                    + l3.layoutMargins.left,
-                y: layoutRect.minY
-                    + l3.layoutMargins.top,
-                width: l3.width,
-                height: maxHeight - l3.verticalMargins))
-        XCTAssertEqual(
-            l2.frame,
-            CGRect(
-                x: layoutRect.minX
-                    + l3.width
-                    + l3.horizontalMargins
-                    + spacing
-                    + l2.layoutMargins.left,
-                y: layoutRect.minY
-                    - l2.layoutMargins.top,
-                width: l2.width,
-                height: maxHeight
-                    - l2.verticalMargins))
-        XCTAssertEqual(
-            l1.frame,
-            CGRect(
-                x: layoutRect.minX
-                    + l3.horizontalMargins
-                    + l3.width
-                    + spacing
-                    + l2.width
-                    + l2.horizontalMargins
-                    + spacing
-                    + l1.layoutMargins.left,
-                y: layoutRect.minY
-                    + l1.layoutMargins.top,
-                width: l1.width,
-                height: maxHeight
-                    - l1.verticalMargins))
-    }
 
     func testVertical() {
         var layout = [l1, l2, l3].layoutLinearly(
             orientation: .vertical,
-            direction: .normal,
             spacing: spacing)
         layout.startLayout(with: layoutRect)
 

                    - l3.horizontalMargins,
                height: l3.height))
    }
    
    func testVerticalReversedMatchParent() {
        l1 = TestLayoutable(sideLength: 30, layoutModes: BayaLayoutOptions.Modes(width: .matchParent, height: .matchParent))
        l2 = TestLayoutable(sideLength: 60, layoutModes: BayaLayoutOptions.Modes(width: .matchParent, height: .matchParent))
        l3 = TestLayoutable(sideLength: 90, layoutModes: BayaLayoutOptions.Modes(width: .matchParent, height: .matchParent))
        var layout = [l1, l2, l3].layoutLinearly(
            orientation: .vertical,
            direction: .reversed,
            spacing: spacing)
        layout.startLayout(with: layoutRect)
        
        let maxWidth = max(
            l1.width + l1.horizontalMargins,
            l2.width + l2.horizontalMargins,
            l3.width + l3.horizontalMargins)
        
        XCTAssertEqual(
            l3.frame,
            CGRect(
                x: layoutRect.minX
                    + l3.layoutMargins.left,
                y: layoutRect.minY
                    + l3.layoutMargins.top,
                width: maxWidth
                    - l3.horizontalMargins,
                height: l3.height))
        XCTAssertEqual(
            l2.frame,
            CGRect(
                x: layoutRect.minX
                    + l2.layoutMargins.left,
                y: layoutRect.minY
                    + l3.verticalMargins
                    + l3.height
                    + spacing
                    + l2.layoutMargins.top,
                width: maxWidth
                    - l2.horizontalMargins,
                height: l2.height))
        XCTAssertEqual(
            l1.frame,
            CGRect(
                x: layoutRect.minX
                    + l1.layoutMargins.left,
                y: layoutRect.minY
                    + l3.height
                    + l3.verticalMargins
                    + l2.height
                    + l2.verticalMargins
                    + l1.layoutMargins.top
                    + spacing * 2,
                width: maxWidth
                    - l1.horizontalMargins,
                height: l1.height))
    }

    func testMeasureHorizontal() {
        var layout = [l1, l2, l3].layoutLinearly(
            orientation: .horizontal,
            direction: .normal,
            spacing: spacing)
        let size = layout.sizeThatFits(layoutRect.size)
        let maxHeight = max(

    func testHorizontal() {
        var layout = [l1, l2, l3].layoutLinearly(
            orientation: .horizontal,
            spacing: spacing)
        layout.startLayout(
            with: layoutRect)
