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
5export TestCase := Window {
6 VerticalLayout {
7 padding: 7px;
8 Flickable {
9 v:= VerticalLayout {
10 padding: 0;
11 spacing: 0;
12 for i in 6: Text {
13 height: 100px;
14 width: 100px;
15 text: "Test";
16 }
17 }
18 }
19 }
20
21 property <bool> test: root.min_width == 7px*2 && root.min_height == 7px*2 && root.preferred_width == 114px && root.preferred_height == 14px + 600px;
22}
23
24/*
25
26```cpp
27auto handle = TestCase::create();
28const TestCase &instance = *handle;
29assert(instance.get_test());
30```
31
32
33```rust
34let instance = TestCase::new().unwrap();
35assert!(instance.get_test());
36```
37
38```js
39var instance = new slint.TestCase();
40assert(instance.test);
41```
42
43*/
44}
45
46#[test] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> {
47 use i_slint_backend_testing as slint_testing;
48 slint_testing::init();
49 let instance = TestCase::new().unwrap();
50 assert!(instance.get_test());
51 Ok(())
52}