1 | #![allow (deprecated)]slint::slint!{#[include_path=r#"/input/slint/tests/driver/driverlib/../../cases/text"# ] |
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 | // This test imports a custom font and declares it for use, to ensure at least that the generated init code for |
6 | // the custom font setup compiles. |
7 | |
8 | import "../../../examples/printerdemo/ui/fonts/NotoSans-Regular.ttf" ; |
9 | import "../../../examples/printerdemo/ui/fonts/NotoSans-Bold.ttf" ; |
10 | |
11 | |
12 | TestCase := Window { |
13 | preferred-width: 100phx; |
14 | preferred-height: 100phx; |
15 | default-font-family: "Noto Sans" ; |
16 | } |
17 | |
18 | /* |
19 | ```rust |
20 | let _instance = TestCase::new().unwrap(); |
21 | ``` |
22 | |
23 | ```cpp |
24 | auto handle = TestCase::create(); |
25 | ``` |
26 | |
27 | ```js |
28 | var instance = new slint.TestCase({}); |
29 | ``` |
30 | */ |
31 | } |
32 | |
33 | #[test ] fn t_0() -> std::result::Result<(), std::boxed::Box<dyn std::error::Error>> { |
34 | use i_slint_backend_testing as slint_testing; |
35 | slint_testing::init(); |
36 | let _instance = TestCase::new().unwrap(); |
37 | Ok(()) |
38 | } |