                 x: layoutRect.minX + l.layoutMargins.left,
                 y: layoutRect.minY + l.layoutMargins.top,
                 width: l.sideLength,
-                height: fixedHeight - l.layoutMargins.top - l.layoutMargins.bottom),
+                height: fixedHeight - l.verticalMargins),
+            "frame not matching")
+    }
+    
+    func testFixedHeightMatchingWidth() {
+        let fixedHeight: CGFloat = 100
+        l = TestLayoutable(layoutModes: BayaLayoutModes(width: .matchParent, height: .wrapContent))
+        var layout = l.layoutWithFixedSize(width: nil, height: fixedHeight)
+        layout.startLayout(with: layoutRect)
+        
+        XCTAssertEqual(
+            l.frame,
+            CGRect(
+                x: layoutRect.minX + l.layoutMargins.left,
+                y: layoutRect.minY + l.layoutMargins.top,
+                width: layoutRect.width - l.horizontalMargins,
+                height: fixedHeight - l.verticalMargins),
             "frame not matching")
     }
 

        XCTAssertEqual(
            fit,
            CGSize(
                width: l.layoutMargins.left + l.layoutMargins.right + l.sideLength,
                height: fixedHeight),
            "size not matching")
    }

            fit,
            CGSize(
                width: fixedWidth,
                height: l.verticalMargins + l.sideLength),
            "size not matching")
    }
}
