tawasuyu

tawasuyu/taffy

A high performance rust-powered UI layout library

Rust 707HTML 660Markdown 12TOML 62344 Definiciones

⎇ a9acf58cd4179aba3230ea7abd27003dc445c034 tests/generated/border_no_child.rs Rust · 21 líneas · 733 B Historia Quién tocó qué crudo

[gentest] Refactor gentest to use WebDriver & quote crate. a9acf58cd · Adam Perry ·

1#[test]
2fn border_no_child() {
3    let layout = stretch::compute(
4        &stretch::style::Node {
5            border: stretch::geometry::Rect {
6                start: stretch::style::Dimension::Points(10f32),
7                end: stretch::style::Dimension::Points(10f32),
8                top: stretch::style::Dimension::Points(10f32),
9                bottom: stretch::style::Dimension::Points(10f32),
10                ..Default::default()
11            },
12            ..Default::default()
13        },
14        stretch::geometry::Size::undefined(),
15    )
16    .unwrap();
17    assert_eq!(layout.size.width, 20f32);
18    assert_eq!(layout.size.height, 20f32);
19    assert_eq!(layout.location.x, 0f32);
20    assert_eq!(layout.location.y, 0f32);
21}