             height: 300 - l3.verticalMargins),
             "unexpected l3 frame")
     }
+
+    func testMeasures() {
+        let layout = [l1, l2, l3]
+            .layoutFrame()
+        let size = layout.sizeThatFits(CGSize(
+            width: 300,
+            height: 200))
+
+        // l2 has the biggest margins and should define the size.
+        XCTAssertEqual(size, CGSize(
+            width: TestLayoutable.sideLength + l2.horizontalMargins,
+            height: TestLayoutable.sideLength + l2.verticalMargins),
+            "sizes don't match")
+    }
 }

        l1 = TestLayoutable()
        l2 = TestLayoutable()
        l3 = TestLayoutable()
    }

    override func tearDown() {

    func testSizes() {
        var layout = [l1, l2, l3]
            .layoutFrame()

        layout.layoutWith(
            frame: CGRect(
