/* * Copyright (c) Contributors to the Open 3D Engine Project. * For complete copyright and license terms please see the LICENSE at the root of this distribution. * * SPDX-License-Identifier: Apache-2.0 OR MIT * */ #include #include #include #include #include #include #include #include #include namespace UnitTest { using ViewportUiCluster = AzToolsFramework::ViewportUi::Internal::ViewportUiCluster; using ButtonGroup = AzToolsFramework::ViewportUi::Internal::ButtonGroup; using Button = AzToolsFramework::ViewportUi::Internal::Button; using ButtonId = AzToolsFramework::ViewportUi::ButtonId; TEST(ViewportUiCluster, RegisterButtonIncreasesClusterHeight) { auto buttonGroup = AZStd::make_shared(); ViewportUiCluster viewportUiCluster(buttonGroup); viewportUiCluster.resize(viewportUiCluster.minimumSizeHint()); // need to initialize cluster with a single button or size will be invalid viewportUiCluster.RegisterButton(AZStd::make_unique