diff options
Diffstat (limited to 'tests/auto/corelib/animation/qsequentialanimationgroup')
3 files changed, 20 insertions, 4 deletions
diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST index f07c0ec4a1..79053cbf68 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/BLACKLIST @@ -1,5 +1,4 @@ [finishWithUncontrolledAnimation] -windows-10 msvc-2015 macos [groupWithZeroDurationAnimations] macos diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt index fead20b2f6..e2ebe8baa9 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/CMakeLists.txt @@ -1,13 +1,19 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -# Generated from qsequentialanimationgroup.pro. - ##################################################################### ## tst_qsequentialanimationgroup Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qsequentialanimationgroup LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qsequentialanimationgroup SOURCES tst_qsequentialanimationgroup.cpp + LIBRARIES + Qt::TestPrivate ) diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index e6e8731378..7555622162 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -1,7 +1,9 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> +#include <QtTest/private/qpropertytesthelper_p.h> + #include <QVariantAnimation> #include <QProperty> #include <QPropertyAnimation> @@ -1685,6 +1687,15 @@ void tst_QSequentialAnimationGroup::bindings() group.bindableCurrentAnimation().setBinding([&]() { return leader.value(); }); QCOMPARE(group.currentAnimation(), anim3.get()); + + QTestPrivate::testReadOnlyPropertyBasics(group, anim3.get(), anim2.get(), "currentAnimation", + [&group, totalDuration]() { + group.setCurrentTime(int(totalDuration * 1.5 / 3)); + }); + if (QTest::currentTestFailed()) { + qDebug("Failed property test for QSequentialAnimationGroup::currentAnimation"); + return; + } } QTEST_MAIN(tst_QSequentialAnimationGroup) |