tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 1061HTML 997Markdown 12TOML 83120 Definiciones

Convert measure tests to gentests (#292)

* Convert measure tests to gentests

* Fix height measurement in text measurefunc for nodes where first line overflows

6652882a96948b4d8ee433a176d428cf3c3916bf · por Nico Burns · (hace 3 años) · padre 163284a65 · ver el árbol en este commit

Delta semántico · 88

benches/generated/measure_child.rs

benches/generated/measure_child_absolute.rs

benches/generated/measure_child_constraint.rs

benches/generated/measure_child_constraint_padding_parent.rs

benches/generated/measure_child_with_flex_grow.rs

benches/generated/measure_child_with_flex_shrink.rs

benches/generated/measure_flex_basis_overrides_measure.rs

benches/generated/measure_height_overrides_measure.rs

benches/generated/measure_remeasure_child_after_growing.rs

benches/generated/measure_remeasure_child_after_shrinking.rs

benches/generated/measure_remeasure_child_after_stretching.rs

benches/generated/measure_root.rs

benches/generated/measure_stretch_overrides_measure.rs

benches/generated/measure_width_overrides_measure.rs

scripts/gentest/src/main.rs

tests/generated/measure_child.rs

tests/generated/measure_child_absolute.rs

tests/generated/measure_child_constraint.rs

tests/generated/measure_child_constraint_padding_parent.rs

tests/generated/measure_child_with_flex_grow.rs

tests/generated/measure_child_with_flex_shrink.rs

tests/generated/measure_flex_basis_overrides_measure.rs

tests/generated/measure_height_overrides_measure.rs

tests/generated/measure_remeasure_child_after_growing.rs

tests/generated/measure_remeasure_child_after_shrinking.rs

tests/generated/measure_remeasure_child_after_stretching.rs

tests/generated/measure_root.rs

tests/generated/measure_stretch_overrides_measure.rs

tests/generated/measure_width_overrides_measure.rs

45 archivos · +1280 −3

diff --git a/benches/generated/measure_child.rs b/benches/generated/measure_child.rs
new file mode 100644
index 000000000..f133b37c8
--- /dev/null
+++ b/benches/generated/measure_child.rs
@@ -0,0 +1,16 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_child_absolute.rs b/benches/generated/measure_child_absolute.rs
new file mode 100644
index 000000000..face4c18b
--- /dev/null
+++ b/benches/generated/measure_child_absolute.rs
@@ -0,0 +1,27 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { position_type: taffy::style::PositionType::Absolute, ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Points(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_child_constraint.rs b/benches/generated/measure_child_constraint.rs
new file mode 100644
index 000000000..5f007d4e9
--- /dev/null
+++ b/benches/generated/measure_child_constraint.rs
@@ -0,0 +1,19 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy . new_leaf_with_measure (taffy :: style :: Style { .. Default :: default () } , taffy :: node :: MeasureFunc :: Raw (| known_dimensions , available_space | { const TEXT : & str = "HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH" ; super :: measure_standard_text (known_dimensions , available_space , TEXT) }) ,) . unwrap () ;
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(50f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_child_constraint_padding_parent.rs b/benches/generated/measure_child_constraint_padding_parent.rs
new file mode 100644
index 000000000..aa4825c91
--- /dev/null
+++ b/benches/generated/measure_child_constraint_padding_parent.rs
@@ -0,0 +1,25 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy . new_leaf_with_measure (taffy :: style :: Style { .. Default :: default () } , taffy :: node :: MeasureFunc :: Raw (| known_dimensions , available_space | { const TEXT : & str = "HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH" ; super :: measure_standard_text (known_dimensions , available_space , TEXT) }) ,) . unwrap () ;
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(50f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                padding: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Points(10f32),
+                    right: taffy::style::LengthPercentage::Points(10f32),
+                    top: taffy::style::LengthPercentage::Points(10f32),
+                    bottom: taffy::style::LengthPercentage::Points(10f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_child_with_flex_grow.rs b/benches/generated/measure_child_with_flex_grow.rs
new file mode 100644
index 000000000..f669f8622
--- /dev/null
+++ b/benches/generated/measure_child_with_flex_grow.rs
@@ -0,0 +1,36 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H\u{200b}H\u{200b}H\u{200b}H\u{200b}H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_child_with_flex_shrink.rs b/benches/generated/measure_child_with_flex_shrink.rs
new file mode 100644
index 000000000..36227254d
--- /dev/null
+++ b/benches/generated/measure_child_with_flex_shrink.rs
@@ -0,0 +1,36 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_flex_basis_overrides_measure.rs b/benches/generated/measure_flex_basis_overrides_measure.rs
new file mode 100644
index 000000000..d3c20d1c1
--- /dev/null
+++ b/benches/generated/measure_flex_basis_overrides_measure.rs
@@ -0,0 +1,27 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(50f32),
+                    height: taffy::style::Dimension::Points(50f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_height_overrides_measure.rs b/benches/generated/measure_height_overrides_measure.rs
new file mode 100644
index 000000000..c1da5b17c
--- /dev/null
+++ b/benches/generated/measure_height_overrides_measure.rs
@@ -0,0 +1,19 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style {
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(5f32) },
+                ..Default::default()
+            },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_remeasure_child_after_growing.rs b/benches/generated/measure_remeasure_child_after_growing.rs
new file mode 100644
index 000000000..319b4ceb6
--- /dev/null
+++ b/benches/generated/measure_remeasure_child_after_growing.rs
@@ -0,0 +1,37 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                align_items: Some(taffy::style::AlignItems::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_remeasure_child_after_shrinking.rs b/benches/generated/measure_remeasure_child_after_shrinking.rs
new file mode 100644
index 000000000..5d5fb4f75
--- /dev/null
+++ b/benches/generated/measure_remeasure_child_after_shrinking.rs
@@ -0,0 +1,38 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                align_items: Some(taffy::style::AlignItems::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_remeasure_child_after_stretching.rs b/benches/generated/measure_remeasure_child_after_stretching.rs
new file mode 100644
index 000000000..9634de418
--- /dev/null
+++ b/benches/generated/measure_remeasure_child_after_stretching.rs
@@ -0,0 +1,27 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Points(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_root.rs b/benches/generated/measure_root.rs
new file mode 100644
index 000000000..10556c0f4
--- /dev/null
+++ b/benches/generated/measure_root.rs
@@ -0,0 +1,15 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_stretch_overrides_measure.rs b/benches/generated/measure_stretch_overrides_measure.rs
new file mode 100644
index 000000000..5df9e18ed
--- /dev/null
+++ b/benches/generated/measure_stretch_overrides_measure.rs
@@ -0,0 +1,38 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_grow: 1f32,
+            flex_basis: taffy::style::Dimension::Points(5f32),
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style {
+                flex_grow: 1f32,
+                flex_basis: taffy::style::Dimension::Points(5f32),
+                ..Default::default()
+            },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(20f32),
+                    height: taffy::style::Dimension::Points(10f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/measure_width_overrides_measure.rs b/benches/generated/measure_width_overrides_measure.rs
new file mode 100644
index 000000000..2fdf02994
--- /dev/null
+++ b/benches/generated/measure_width_overrides_measure.rs
@@ -0,0 +1,19 @@
+pub fn compute() {
+    #[allow(unused_imports)]
+    use taffy::prelude::*;
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style {
+                size: taffy::geometry::Size { width: taffy::style::Dimension::Points(50f32), height: auto() },
+                ..Default::default()
+            },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+}
diff --git a/benches/generated/mod.rs b/benches/generated/mod.rs
index b5e58dc88..8abc37120 100644
--- a/benches/generated/mod.rs
+++ b/benches/generated/mod.rs
@@ -31,7 +31,9 @@ fn measure_standard_text(
         let mut current_line_length = 0;
         for line in &lines {
             if current_line_length + line.len() > width_line_length {
-                line_count += 1;
+                if current_line_length > 0 {
+                    line_count += 1
+                };
                 current_line_length = line.len();
             } else {
                 current_line_length += line.len();
@@ -443,6 +445,20 @@ mod max_height_overrides_height_on_root;
 mod max_width;
 mod max_width_overrides_width;
 mod max_width_overrides_width_on_root;
+mod measure_child;
+mod measure_child_absolute;
+mod measure_child_constraint;
+mod measure_child_constraint_padding_parent;
+mod measure_child_with_flex_grow;
+mod measure_child_with_flex_shrink;
+mod measure_flex_basis_overrides_measure;
+mod measure_height_overrides_measure;
+mod measure_remeasure_child_after_growing;
+mod measure_remeasure_child_after_shrinking;
+mod measure_remeasure_child_after_stretching;
+mod measure_root;
+mod measure_stretch_overrides_measure;
+mod measure_width_overrides_measure;
 mod min_height;
 mod min_height_overrides_height;
 mod min_height_overrides_height_on_root;
@@ -927,6 +943,20 @@ fn benchmark(c: &mut Criterion) {
             max_width::compute();
             max_width_overrides_width::compute();
             max_width_overrides_width_on_root::compute();
+            measure_child::compute();
+            measure_child_absolute::compute();
+            measure_child_constraint::compute();
+            measure_child_constraint_padding_parent::compute();
+            measure_child_with_flex_grow::compute();
+            measure_child_with_flex_shrink::compute();
+            measure_flex_basis_overrides_measure::compute();
+            measure_height_overrides_measure::compute();
+            measure_remeasure_child_after_growing::compute();
+            measure_remeasure_child_after_shrinking::compute();
+            measure_remeasure_child_after_stretching::compute();
+            measure_root::compute();
+            measure_stretch_overrides_measure::compute();
+            measure_width_overrides_measure::compute();
             min_height::compute();
             min_height_overrides_height::compute();
             min_height_overrides_height_on_root::compute();
diff --git a/scripts/gentest/src/main.rs b/scripts/gentest/src/main.rs
index e487badb6..42b84f31e 100644
--- a/scripts/gentest/src/main.rs
+++ b/scripts/gentest/src/main.rs
@@ -853,7 +853,9 @@ fn generate_generic_measure_function() -> TokenStream {
                 let mut current_line_length = 0;
                 for line in &lines {
                     if current_line_length + line.len() > width_line_length {
-                        line_count += 1;
+                        if current_line_length > 0 {
+                            line_count += 1
+                        };
                         current_line_length = line.len();
                     } else {
                         current_line_length += line.len();
diff --git a/test_fixtures/measure_child.html b/test_fixtures/measure_child.html
new file mode 100644
index 000000000..6d07259f3
--- /dev/null
+++ b/test_fixtures/measure_child.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root">
+  <div>HHHHHH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_child_absolute.html b/test_fixtures/measure_child_absolute.html
new file mode 100644
index 000000000..a5f46fa4e
--- /dev/null
+++ b/test_fixtures/measure_child_absolute.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width: 100px;height: 100px">
+  <div style="position: absolute;">HHHHHH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_child_constraint.html b/test_fixtures/measure_child_constraint.html
new file mode 100644
index 000000000..b5a17673b
--- /dev/null
+++ b/test_fixtures/measure_child_constraint.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:50px; height: auto;">
+  <div>HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_child_constraint_padding_parent.html b/test_fixtures/measure_child_constraint_padding_parent.html
new file mode 100644
index 000000000..feff4eb2f
--- /dev/null
+++ b/test_fixtures/measure_child_constraint_padding_parent.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:50px; height: auto;padding: 10px">
+  <div>HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_child_with_flex_grow.html b/test_fixtures/measure_child_with_flex_grow.html
new file mode 100644
index 000000000..2158d9c76
--- /dev/null
+++ b/test_fixtures/measure_child_with_flex_grow.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:100px; height: auto">
+  <div style="width: 50px;height: 50px"></div>
+  <div>H&ZeroWidthSpace;H&ZeroWidthSpace;H&ZeroWidthSpace;H&ZeroWidthSpace;H</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_child_with_flex_shrink.html b/test_fixtures/measure_child_with_flex_shrink.html
new file mode 100644
index 000000000..7e68dfc65
--- /dev/null
+++ b/test_fixtures/measure_child_with_flex_shrink.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:100px; height: auto">
+  <div style="width: 50px;height: 50px"></div>
+  <div>HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH&ZeroWidthSpace;HHHHHHHHHH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_flex_basis_overrides_measure.html b/test_fixtures/measure_flex_basis_overrides_measure.html
new file mode 100644
index 000000000..ff8fce9e1
--- /dev/null
+++ b/test_fixtures/measure_flex_basis_overrides_measure.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width: 50px;height: 50px;">
+  <div>H</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_height_overrides_measure.html b/test_fixtures/measure_height_overrides_measure.html
new file mode 100644
index 000000000..757f78414
--- /dev/null
+++ b/test_fixtures/measure_height_overrides_measure.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root">
+  <div style="height:5px">H</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_remeasure_child_after_growing.html b/test_fixtures/measure_remeasure_child_after_growing.html
new file mode 100644
index 000000000..995fa2dd6
--- /dev/null
+++ b/test_fixtures/measure_remeasure_child_after_growing.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:100px; height: auto;align-items: start;">
+  <div style="width: 50px;height: 50px"></div>
+  <div>HH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_remeasure_child_after_shrinking.html b/test_fixtures/measure_remeasure_child_after_shrinking.html
new file mode 100644
index 000000000..52b5d1a04
--- /dev/null
+++ b/test_fixtures/measure_remeasure_child_after_shrinking.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:100px; height: auto;align-items: start;">
+  <div style="width: 50px;height: 50px;flex-shrink: 0;"></div>
+  <div>HH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_remeasure_child_after_stretching.html b/test_fixtures/measure_remeasure_child_after_stretching.html
new file mode 100644
index 000000000..357a6cf25
--- /dev/null
+++ b/test_fixtures/measure_remeasure_child_after_stretching.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width:100px; height: 100px;">
+  <div>HH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_root.html b/test_fixtures/measure_root.html
new file mode 100644
index 000000000..ba81454f1
--- /dev/null
+++ b/test_fixtures/measure_root.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root">HHHHHH</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_stretch_overrides_measure.html b/test_fixtures/measure_stretch_overrides_measure.html
new file mode 100644
index 000000000..6dd86bf70
--- /dev/null
+++ b/test_fixtures/measure_stretch_overrides_measure.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root" style="width: 20px;height: 10px;">
+  <div style="flex-basis: 5px;flex-grow: 1;"></div>
+  <div style="flex-basis: 5px;flex-grow: 1;">H</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/test_fixtures/measure_width_overrides_measure.html b/test_fixtures/measure_width_overrides_measure.html
new file mode 100644
index 000000000..083eb6fda
--- /dev/null
+++ b/test_fixtures/measure_width_overrides_measure.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <script src="../scripts/gentest/test_helper.js"></script>
+  <link rel="stylesheet" type="text/css" href="../scripts/gentest/test_base_style.css">
+  <title>
+    Test description
+  </title>
+<head/>
+<body>
+
+<div id="test-root">
+  <div style="width:50px">HHHHHHHHHH</div>
+</div>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/tests/generated/measure_child.rs b/tests/generated/measure_child.rs
new file mode 100644
index 000000000..24a63f39d
--- /dev/null
+++ b/tests/generated/measure_child.rs
@@ -0,0 +1,31 @@
+#[test]
+fn measure_child() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 60f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 60f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 60f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 60f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_child_absolute.rs b/tests/generated/measure_child_absolute.rs
new file mode 100644
index 000000000..f5ac8b551
--- /dev/null
+++ b/tests/generated/measure_child_absolute.rs
@@ -0,0 +1,42 @@
+#[test]
+fn measure_child_absolute() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { position_type: taffy::style::PositionType::Absolute, ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Points(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 60f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 60f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_child_constraint.rs b/tests/generated/measure_child_constraint.rs
new file mode 100644
index 000000000..7f7b1e9e9
--- /dev/null
+++ b/tests/generated/measure_child_constraint.rs
@@ -0,0 +1,34 @@
+#[test]
+fn measure_child_constraint() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy . new_leaf_with_measure (taffy :: style :: Style { .. Default :: default () } , taffy :: node :: MeasureFunc :: Raw (| known_dimensions , available_space | { const TEXT : & str = "HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH" ; super :: measure_standard_text (known_dimensions , available_space , TEXT) }) ,) . unwrap () ;
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(50f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_child_constraint_padding_parent.rs b/tests/generated/measure_child_constraint_padding_parent.rs
new file mode 100644
index 000000000..843a025c0
--- /dev/null
+++ b/tests/generated/measure_child_constraint_padding_parent.rs
@@ -0,0 +1,40 @@
+#[test]
+fn measure_child_constraint_padding_parent() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy . new_leaf_with_measure (taffy :: style :: Style { .. Default :: default () } , taffy :: node :: MeasureFunc :: Raw (| known_dimensions , available_space | { const TEXT : & str = "HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH" ; super :: measure_standard_text (known_dimensions , available_space , TEXT) }) ,) . unwrap () ;
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(50f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                padding: taffy::geometry::Rect {
+                    left: taffy::style::LengthPercentage::Points(10f32),
+                    right: taffy::style::LengthPercentage::Points(10f32),
+                    top: taffy::style::LengthPercentage::Points(10f32),
+                    bottom: taffy::style::LengthPercentage::Points(10f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.width);
+    assert_eq!(size.height, 120f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 120f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 100f32, size.height);
+    assert_eq!(location.x, 10f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, location.x);
+    assert_eq!(location.y, 10f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, location.y);
+}
diff --git a/tests/generated/measure_child_with_flex_grow.rs b/tests/generated/measure_child_with_flex_grow.rs
new file mode 100644
index 000000000..4b53d7cea
--- /dev/null
+++ b/tests/generated/measure_child_with_flex_grow.rs
@@ -0,0 +1,56 @@
+#[test]
+fn measure_child_with_flex_grow() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H\u{200b}H\u{200b}H\u{200b}H\u{200b}H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node1.data(), 50f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node1.data(), 50f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node1.data(), 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_child_with_flex_shrink.rs b/tests/generated/measure_child_with_flex_shrink.rs
new file mode 100644
index 000000000..b4df00bcb
--- /dev/null
+++ b/tests/generated/measure_child_with_flex_shrink.rs
@@ -0,0 +1,56 @@
+#[test]
+fn measure_child_with_flex_shrink() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH\u{200b}HHHHHHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 0f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node1.data(), 100f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node1.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node1.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_flex_basis_overrides_measure.rs b/tests/generated/measure_flex_basis_overrides_measure.rs
new file mode 100644
index 000000000..8e905fc27
--- /dev/null
+++ b/tests/generated/measure_flex_basis_overrides_measure.rs
@@ -0,0 +1,42 @@
+#[test]
+fn measure_flex_basis_overrides_measure() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(50f32),
+                    height: taffy::style::Dimension::Points(50f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 10f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_height_overrides_measure.rs b/tests/generated/measure_height_overrides_measure.rs
new file mode 100644
index 000000000..035171dad
--- /dev/null
+++ b/tests/generated/measure_height_overrides_measure.rs
@@ -0,0 +1,34 @@
+#[test]
+fn measure_height_overrides_measure() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style {
+                size: taffy::geometry::Size { width: auto(), height: taffy::style::Dimension::Points(5f32) },
+                ..Default::default()
+            },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 10f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 10f32, size.width);
+    assert_eq!(size.height, 5f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 5f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 10f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.width);
+    assert_eq!(size.height, 5f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 5f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_remeasure_child_after_growing.rs b/tests/generated/measure_remeasure_child_after_growing.rs
new file mode 100644
index 000000000..7593f3041
--- /dev/null
+++ b/tests/generated/measure_remeasure_child_after_growing.rs
@@ -0,0 +1,57 @@
+#[test]
+fn measure_remeasure_child_after_growing() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                align_items: Some(taffy::style::AlignItems::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node1.data(), 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1.data(), 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node1.data(), 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_remeasure_child_after_shrinking.rs b/tests/generated/measure_remeasure_child_after_shrinking.rs
new file mode 100644
index 000000000..07afd1ef4
--- /dev/null
+++ b/tests/generated/measure_remeasure_child_after_shrinking.rs
@@ -0,0 +1,58 @@
+#[test]
+fn measure_remeasure_child_after_shrinking() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_shrink: 0f32,
+            size: taffy::geometry::Size {
+                width: taffy::style::Dimension::Points(50f32),
+                height: taffy::style::Dimension::Points(50f32),
+            },
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                align_items: Some(taffy::style::AlignItems::Start),
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Auto,
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.width);
+    assert_eq!(size.height, 50f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node1.data(), 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1.data(), 10f32, size.height);
+    assert_eq!(location.x, 50f32, "x of node {:?}. Expected {}. Actual {}", node1.data(), 50f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_remeasure_child_after_stretching.rs b/tests/generated/measure_remeasure_child_after_stretching.rs
new file mode 100644
index 000000000..b17c7b733
--- /dev/null
+++ b/tests/generated/measure_remeasure_child_after_stretching.rs
@@ -0,0 +1,42 @@
+#[test]
+fn measure_remeasure_child_after_stretching() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(100f32),
+                    height: taffy::style::Dimension::Points(100f32),
+                },
+                ..Default::default()
+            },
+            &[node0],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 100f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 20f32, size.width);
+    assert_eq!(size.height, 100f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 100f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_root.rs b/tests/generated/measure_root.rs
new file mode 100644
index 000000000..d5cb1c133
--- /dev/null
+++ b/tests/generated/measure_root.rs
@@ -0,0 +1,25 @@
+#[test]
+fn measure_root() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style { ..Default::default() },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 60f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 60f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_stretch_overrides_measure.rs b/tests/generated/measure_stretch_overrides_measure.rs
new file mode 100644
index 000000000..52406af23
--- /dev/null
+++ b/tests/generated/measure_stretch_overrides_measure.rs
@@ -0,0 +1,58 @@
+#[test]
+fn measure_stretch_overrides_measure() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf(taffy::style::Style {
+            flex_grow: 1f32,
+            flex_basis: taffy::style::Dimension::Points(5f32),
+            ..Default::default()
+        })
+        .unwrap();
+    let node1 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style {
+                flex_grow: 1f32,
+                flex_basis: taffy::style::Dimension::Points(5f32),
+                ..Default::default()
+            },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "H";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy
+        .new_with_children(
+            taffy::style::Style {
+                size: taffy::geometry::Size {
+                    width: taffy::style::Dimension::Points(20f32),
+                    height: taffy::style::Dimension::Points(10f32),
+                },
+                ..Default::default()
+            },
+            &[node0, node1],
+        )
+        .unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 20f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 20f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 10f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node1).unwrap();
+    assert_eq!(size.width, 10f32, "width of node {:?}. Expected {}. Actual {}", node1.data(), 10f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node1.data(), 10f32, size.height);
+    assert_eq!(location.x, 10f32, "x of node {:?}. Expected {}. Actual {}", node1.data(), 10f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node1.data(), 0f32, location.y);
+}
diff --git a/tests/generated/measure_width_overrides_measure.rs b/tests/generated/measure_width_overrides_measure.rs
new file mode 100644
index 000000000..39350b4db
--- /dev/null
+++ b/tests/generated/measure_width_overrides_measure.rs
@@ -0,0 +1,34 @@
+#[test]
+fn measure_width_overrides_measure() {
+    use slotmap::Key;
+    #[allow(unused_imports)]
+    use taffy::{layout::Layout, prelude::*};
+    let mut taffy = taffy::Taffy::new();
+    let node0 = taffy
+        .new_leaf_with_measure(
+            taffy::style::Style {
+                size: taffy::geometry::Size { width: taffy::style::Dimension::Points(50f32), height: auto() },
+                ..Default::default()
+            },
+            taffy::node::MeasureFunc::Raw(|known_dimensions, available_space| {
+                const TEXT: &str = "HHHHHHHHHH";
+                super::measure_standard_text(known_dimensions, available_space, TEXT)
+            }),
+        )
+        .unwrap();
+    let node = taffy.new_with_children(taffy::style::Style { ..Default::default() }, &[node0]).unwrap();
+    taffy.compute_layout(node, taffy::geometry::Size::MAX_CONTENT).unwrap();
+    println!("\nComputed tree:");
+    taffy::debug::print_tree(&taffy, node);
+    println!();
+    let Layout { size, location, .. } = taffy.layout(node).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node.data(), 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node.data(), 0f32, location.y);
+    let Layout { size, location, .. } = taffy.layout(node0).unwrap();
+    assert_eq!(size.width, 50f32, "width of node {:?}. Expected {}. Actual {}", node0.data(), 50f32, size.width);
+    assert_eq!(size.height, 10f32, "height of node {:?}. Expected {}. Actual {}", node0.data(), 10f32, size.height);
+    assert_eq!(location.x, 0f32, "x of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.x);
+    assert_eq!(location.y, 0f32, "y of node {:?}. Expected {}. Actual {}", node0.data(), 0f32, location.y);
+}
diff --git a/tests/generated/mod.rs b/tests/generated/mod.rs
index 93f2a398d..cd0ce0c8a 100644
--- a/tests/generated/mod.rs
+++ b/tests/generated/mod.rs
@@ -30,7 +30,9 @@ fn measure_standard_text(
         let mut current_line_length = 0;
         for line in &lines {
             if current_line_length + line.len() > width_line_length {
-                line_count += 1;
+                if current_line_length > 0 {
+                    line_count += 1
+                };
                 current_line_length = line.len();
             } else {
                 current_line_length += line.len();
@@ -442,6 +444,20 @@ mod max_height_overrides_height_on_root;
 mod max_width;
 mod max_width_overrides_width;
 mod max_width_overrides_width_on_root;
+mod measure_child;
+mod measure_child_absolute;
+mod measure_child_constraint;
+mod measure_child_constraint_padding_parent;
+mod measure_child_with_flex_grow;
+mod measure_child_with_flex_shrink;
+mod measure_flex_basis_overrides_measure;
+mod measure_height_overrides_measure;
+mod measure_remeasure_child_after_growing;
+mod measure_remeasure_child_after_shrinking;
+mod measure_remeasure_child_after_stretching;
+mod measure_root;
+mod measure_stretch_overrides_measure;
+mod measure_width_overrides_measure;
 mod min_height;
 mod min_height_overrides_height;
 mod min_height_overrides_height_on_root;