diff options
Diffstat (limited to 'tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp')
-rw-r--r-- | tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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) |