1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
3
4 TestCase := Rectangle {
5 property<int> t1: ceil(42.2);
6 property<int> t2: ceil(23.5);
7 property<int> t3: ceil(24.6);
8 property<int> t4: ceil(25);
9
10 property<int> n1: ceil(-42.2);
11 property<int> n2: ceil(-23.5);
12 property<int> n3: ceil(-24.6);
13 property<int> n4: ceil(-25);
14}
15/*
16```cpp
17auto handle = TestCase::create();
18const TestCase &instance = *handle;
19assert_eq(instance.get_t1(), 43);
20assert_eq(instance.get_t2(), 24);
21assert_eq(instance.get_t3(), 25);
22assert_eq(instance.get_t4(), 25);
23assert_eq(instance.get_n1(), -42);
24assert_eq(instance.get_n2(), -23);
25assert_eq(instance.get_n3(), -24);
26assert_eq(instance.get_n4(), -25);
27```
28
29```rust
30let instance = TestCase::new().unwrap();
31assert_eq!(instance.get_t1(), 43);
32assert_eq!(instance.get_t2(), 24);
33assert_eq!(instance.get_t3(), 25);
34assert_eq!(instance.get_t4(), 25);
35assert_eq!(instance.get_n1(), -42);
36assert_eq!(instance.get_n2(), -23);
37assert_eq!(instance.get_n3(), -24);
38assert_eq!(instance.get_n4(), -25);
39```
40
41```js
42var instance = new slint.TestCase({});
43assert.equal(instance.t1, 43);
44assert.equal(instance.t2, 24);
45assert.equal(instance.t3, 25);
46assert.equal(instance.t4, 25);
47assert.equal(instance.n1, -42);
48assert.equal(instance.n2, -23);
49assert.equal(instance.n3, -24);
50assert.equal(instance.n4, -25);
51```
52*/
53