gioser

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 499HTML 238Markdown 7TOML 31442 Definiciones

⎇ ac3349ce0fd60591d6019a4658dfe84912514e62 tests/generated/max_width_overrides_width_on_root.rs Rust · 20 líneas · 693 B Historia Quién tocó qué crudo

[gentest] Split generated tests into separate files. ac3349ce0 · Adam Perry ·

1#[test]
2fn max_width_overrides_width_on_root() {
3    let layout = stretch::compute(
4        &stretch::style::Node {
5            size: stretch::geometry::Size { width: stretch::style::Dimension::Points(200.0000), ..Default::default() },
6            max_size: stretch::geometry::Size {
7                width: stretch::style::Dimension::Points(100.0000),
8                ..Default::default()
9            },
10            ..Default::default()
11        },
12        stretch::geometry::Size::undefined(),
13    )
14    .unwrap();
15
16    assert_eq!(layout.size.width, 100.0000);
17    assert_eq!(layout.size.height, 0.0000);
18    assert_eq!(layout.location.x, 0.0000);
19    assert_eq!(layout.location.y, 0.0000);
20}