build "core init test/volatile_object" create_boot_directory install_config { } build_boot_image "core init test-volatile_object" append qemu_args "-nographic -m 64" run_genode_until {child exited with exit value 0.*\n} 10 grep_output {-> test-volatile_object} compare_output_to { [init -> test-volatile_object] --- test-volatile_object started --- [init -> test-volatile_object] construct Object 1 [init -> test-volatile_object] construct Object 2 [init -> test-volatile_object] -- create Compound object -- [init -> test-volatile_object] construct Member_with_reference [init -> test-volatile_object] construct Compound [init -> test-volatile_object] compound.member.is_constructed returns 1 [init -> test-volatile_object] compound.lazy_member.is_constructed returns 0 [init -> test-volatile_object] -- construct lazy member -- [init -> test-volatile_object] construct Member_with_reference [init -> test-volatile_object] compound.lazy_member.is_constructed returns 1 [init -> test-volatile_object] -- call method on member (with reference to Object 1) -- [init -> test-volatile_object] const method called on Object 1 [init -> test-volatile_object] -- reconstruct member with Object 2 as reference -- [init -> test-volatile_object] destruct Member_with_reference [init -> test-volatile_object] construct Member_with_reference [init -> test-volatile_object] -- call method on member -- [init -> test-volatile_object] const method called on Object 2 [init -> test-volatile_object] -- destruct member -- [init -> test-volatile_object] destruct Member_with_reference [init -> test-volatile_object] -- try to call method on member, catch exception -- [init -> test-volatile_object] got exception, as expected [init -> test-volatile_object] -- destruct Compound and Objects 1 and 2 -- [init -> test-volatile_object] destruct Compound [init -> test-volatile_object] destruct Member_with_reference [init -> test-volatile_object] destruct Object 2 [init -> test-volatile_object] destruct Object 1 [init -> test-volatile_object] --- test-volatile_object finished --- }