1 | #![allow (deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/imports/../../helper_components"# ] |
2 | #[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/imports"# ] |
3 | // Copyright © SixtyFPS GmbH <info@slint.dev> |
4 | // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial |
5 | |
6 | //include_path: ../../helper_components |
7 | import { MainWindow } from "main_window.slint" ; |
8 | |
9 | /* |
10 | |
11 | ```cpp |
12 | auto handle = MainWindow::create(); |
13 | const MainWindow &instance = *handle; |
14 | assert_eq(instance.get_some_prop(), 42); |
15 | ``` |
16 | |
17 | ```rust |
18 | let instance = MainWindow::new().unwrap(); |
19 | assert_eq!(instance.get_some_prop(), 42); |
20 | ``` |
21 | |
22 | ```js |
23 | var instance = new slint.MainWindow({}); |
24 | assert.equal(instance.some_prop, 42); |
25 | ``` |
26 | |
27 | */ |
28 | } |
29 | |
30 | #[test ] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> { |
31 | use i_slint_backend_testing as slint_testing; |
32 | slint_testing::init(); |
33 | let instance = MainWindow::new().unwrap(); |
34 | assert_eq!(instance.get_some_prop(), 42); |
35 | Ok(()) |
36 | } |