Retain request dependencies only when discovery supplies the answer
This commit is contained in:
1 parent
8780b40bb7
commit
0e838e9dd1
7 files changed
+183
-50
No files matched your search
+22
-12
@@ -92,18 +92,28 @@ fn request_edits_in_a_nested_child_reach_the_allocator() {
|
||||
|
||||
#[test]
|
||||
fn adding_a_bound_to_a_previously_unbounded_share_reallocates_the_row() {
|
||||
let mut h = Harness::new((300, 100));
|
||||
let a = rect(Color::RED).add(&mut h.rsc);
|
||||
let b = rect(Color::BLUE).add(&mut h.rsc);
|
||||
h.set_root((a, b).span(Dir::RIGHT));
|
||||
h.resize((400, 100));
|
||||
h.frame();
|
||||
h.rsc
|
||||
.widgets_mut()
|
||||
.set_size_rule(a, Axis::X, SizeRule::Max(Len::px(80.0)));
|
||||
h.frame();
|
||||
assert_corners!(h, a, (0, 0), (80, 100));
|
||||
assert_corners!(h, b, (80, 0), (400, 100));
|
||||
for hinted in [true, false] {
|
||||
let mut h = Harness::new((300, 100));
|
||||
let a = if hinted {
|
||||
rect(Color::RED).add_strong(&mut h.rsc).any()
|
||||
} else {
|
||||
h.rsc.widgets_mut().add_strong(Unhinted).any()
|
||||
};
|
||||
let id = a.id();
|
||||
let b = rect(Color::BLUE).add(&mut h.rsc);
|
||||
let mut row = Span::empty(Dir::RIGHT);
|
||||
row.push(a);
|
||||
row.push(b.add_strong(&mut h.rsc));
|
||||
h.set_root(row);
|
||||
h.resize((400, 100));
|
||||
h.frame();
|
||||
h.rsc
|
||||
.widgets_mut()
|
||||
.set_size_rule(id, Axis::X, SizeRule::Max(Len::px(80.0)));
|
||||
h.frame();
|
||||
assert_corners!(h, id, (0, 0), (80, 100));
|
||||
assert_corners!(h, b, (80, 0), (400, 100));
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in new issue
Block a user