PropertyIntSliderCtrlTests.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include "PropertyIntCtrlCommonTests.h"
  9. #include <AzToolsFramework/UI/PropertyEditor/PropertyIntSliderCtrl.hxx>
  10. namespace UnitTest
  11. {
  12. using namespace AzToolsFramework;
  13. template <typename ValueType>
  14. using PropertySliderCtrlFixture = PropertyCtrlFixture<ValueType, PropertyIntSliderCtrl, IntSliderHandler>;
  15. TYPED_TEST_SUITE(PropertySliderCtrlFixture, IntegerPrimtitiveTestConfigs);
  16. TYPED_TEST(PropertySliderCtrlFixture, PropertySliderCtrlHandlersCreated)
  17. {
  18. this->PropertyCtrlHandlersCreated();
  19. }
  20. TYPED_TEST(PropertySliderCtrlFixture, PropertySliderCtrlWidgetsCreated)
  21. {
  22. this->PropertyCtrlWidgetsCreated();
  23. }
  24. TYPED_TEST(PropertySliderCtrlFixture, SliderWidget_Minimum_ExpectQtWidgetLimits_Min)
  25. {
  26. this->Widget_Minimum_ExpectQtWidgetLimits_Min();
  27. }
  28. TYPED_TEST(PropertySliderCtrlFixture, SliderWidget_Maximum_ExpectQtWidgetLimits_Max)
  29. {
  30. EXPECT_EQ(this->m_widget->maximum(), AzToolsFramework::QtWidgetLimits<TypeParam>::Max());
  31. }
  32. TYPED_TEST(PropertySliderCtrlFixture, SliderHandlerMinMaxLimit_ModifyHandler_ExpectSuccessAndValidRangeLimitToolTipString)
  33. {
  34. this->HandlerMinMaxLimit_ModifyHandler_ExpectSuccessAndValidRangeLimitToolTipString();
  35. }
  36. TYPED_TEST(PropertySliderCtrlFixture, SliderHandlerMinMaxLessLimit_ModifyHandler_ExpectSuccessAndValidLessLimitToolTipString)
  37. {
  38. this->HandlerMinMaxLessLimit_ModifyHandler_ExpectSuccessAndValidLessLimitToolTipString();
  39. }
  40. } // namespace UnitTest