1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/bindings"#]
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
6TestCase := Rectangle {
7
8 width: 100px;
9 height: 200px;
10
11 r := Rectangle {
12 // default geometry for width & height
13 animate height { duration: 1s; }
14 animate width { duration: 1s; }
15 }
16
17 property<bool> test: r.width == 100px && r.height == 200px;
18}
19
20/*
21```rust
22let instance = TestCase::new().unwrap();
23assert!(instance.get_test());
24```
25
26```cpp
27auto handle = TestCase::create();
28const TestCase &instance = *handle;
29assert(instance.get_test());
30```
31
32```js
33let instance = new slint.TestCase({});
34assert(instance.test, 1);
35```
36
37*/
38}
39
40#[test] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> {
41 use i_slint_backend_testing as slint_testing;
42 slint_testing::init();
43 let instance = TestCase::new().unwrap();
44 assert!(instance.get_test());
45 Ok(())
46}