/* * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #include #include TEST_CASE(destroy_self_owning_object) { struct SelfOwning { OwnPtr self; }; OwnPtr object = make(); auto* object_ptr = object.ptr(); object->self = move(object); object = nullptr; object_ptr->self = nullptr; }