1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/layout"#]
2// Copyright © SixtyFPS GmbH <info@slint.dev>
3// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
4
5// Test the propagation of maximum and minimum size through nested grid layouts
6
7TestCase := Rectangle {
8 min-width: 500px;
9 max-width: min-width;
10
11 property xxx <=> preferred-height;
12 HorizontalLayout {
13 Rectangle { height: 88px; }
14 }
15
16 property <bool> test: min-width == 500px && max-width == 500px && xxx == 88px;
17}
18
19/*
20```cpp
21auto handle = TestCase::create();
22const TestCase &instance = *handle;
23assert(instance.get_test());
24```
25
26```rust
27let instance = TestCase::new().unwrap();
28assert!(instance.get_test());
29```
30
31```js
32var instance = new slint.TestCase({});
33assert(instance.test);
34```
35*/
36}
37
38#[test] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> {
39 use i_slint_backend_testing as slint_testing;
40 slint_testing::init();
41 let instance = TestCase::new().unwrap();
42 assert!(instance.get_test());
43 Ok(())
44}