// Copyright © SixtyFPS GmbH // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 // This tests that constant property from global are properly initialized global Glob { in-out property a: 3; in-out property b: a + 3; } global Glob2 { in-out property a: other; in-out property other: 5; // A constant property that is not going to be inlined out property const-no-inline: { debug("this debug message should make no-inline to not be inlined"); 82 } } export component TestCase inherits Window { r := Rectangle { property value1: Glob.b; property value2: true ? Glob2.a : 88; } out property value3: Glob2.const-no-inline; out property test: r.value1 + r.value2 == 3+3 +5 && value3 == 82; } /* ```rust let instance = TestCase::new().unwrap(); assert_eq!(instance.get_value3(), 82); assert!(instance.get_test()); ``` ```cpp auto handle = TestCase::create(); const TestCase &instance = *handle; assert_eq(instance.get_value3(), 82); assert(instance.get_test()); ``` ```js let instance = new slint.TestCase({}); assert.equal(instance.value3, 82); assert(instance.test); ``` */