/* LICENSE BEGIN This file is part of the SixtyFPS Project -- https://sixtyfps.io Copyright (c) 2021 Olivier Goffart Copyright (c) 2021 Simon Hausmann SPDX-License-Identifier: GPL-3.0-only This file is also available under commercial licensing terms. Please contact info@sixtyfps.io for more information. LICENSE END */ TestCase := Rectangle { property a:12; property s1: "hello" + a + a; property s2: 10 + "hello" + 5.1; property s3: "x"; property<{ a: string }> obj: { a: "a" }; property s4: obj.a + "xxx"; callback foo; foo => { s3 += a; s3 += s3; obj.a += "yo"; } } /* ```cpp auto handle = TestCase::create(); const TestCase &instance = *handle; assert_eq(instance.get_s1(), sixtyfps::SharedString("hello1212")); assert_eq(instance.get_s2(), sixtyfps::SharedString("10hello5.1")); instance.set_a(42); assert_eq(instance.get_s1(), sixtyfps::SharedString("hello4242")); instance.invoke_foo(); assert_eq(instance.get_s3(), sixtyfps::SharedString("x42x42")); assert_eq(instance.get_s4(), sixtyfps::SharedString("ayoxxx")); ``` ```rust let instance = TestCase::new(); assert_eq!(instance.get_s1(), sixtyfps::SharedString::from("hello1212")); assert_eq!(instance.get_s2(), sixtyfps::SharedString::from("10hello5.1")); instance.set_a(42); assert_eq!(instance.get_s1(), sixtyfps::SharedString::from("hello4242")); instance.invoke_foo(); assert_eq!(instance.get_s3(), sixtyfps::SharedString::from("x42x42")); assert_eq!(instance.get_s4(), sixtyfps::SharedString::from("ayoxxx")); ``` ```js var instance = new sixtyfps.TestCase({}); assert.equal(instance.s1, "hello1212"); assert.equal(instance.s2, "10hello5.1"); instance.a = 42; assert.equal(instance.s1, "hello4242"); instance.foo(); assert.equal(instance.s3, "x42x42"); assert.equal(instance.s4, "ayoxxx"); ``` */