1#![allow(deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/properties"#]
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 component TestCase {
6 rect := Rectangle {
7 border-radius: 45px;
8 border-top-left-radius: 98px;
9 }
10
11 out property<bool> tl_ok: rect.border-top-left-radius == 98px;
12 out property<bool> tr_ok: rect.border-top-right-radius == 45px;
13 out property<bool> br_ok: rect.border-bottom-right-radius == 45px;
14 out property<bool> bl_ok: rect.border-bottom-left-radius == 45px;
15
16 out property<bool> test: tl_ok && tr_ok && br_ok && bl_ok;
17}
18
19/*
20
21```cpp
22auto handle = TestCase::create();
23const TestCase &instance = *handle;
24assert(instance.get_test());
25```
26
27
28```rust
29let instance = TestCase::new().unwrap();
30assert!(instance.get_test());
31```
32
33
34```js
35var instance = new slint.TestCase({});
36assert(instance.test);
37```
38
39*/
40}
41
42#[test] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> {
43 use i_slint_backend_testing as slint_testing;
44 slint_testing::init();
45 let instance = TestCase::new().unwrap();
46 assert!(instance.get_test());
47 Ok(())
48}