diff options
Diffstat (limited to 'tests/auto/corelib/global/qflags')
-rw-r--r-- | tests/auto/corelib/global/qflags/CMakeLists.txt | 6 | ||||
-rw-r--r-- | tests/auto/corelib/global/qflags/tst_qflags.cpp | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/corelib/global/qflags/CMakeLists.txt b/tests/auto/corelib/global/qflags/CMakeLists.txt index 54853bf792..8b01ea774f 100644 --- a/tests/auto/corelib/global/qflags/CMakeLists.txt +++ b/tests/auto/corelib/global/qflags/CMakeLists.txt @@ -5,6 +5,12 @@ ## tst_qflags Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_qflags LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_qflags SOURCES tst_qflags.cpp diff --git a/tests/auto/corelib/global/qflags/tst_qflags.cpp b/tests/auto/corelib/global/qflags/tst_qflags.cpp index f267fc4497..d226e8d6b4 100644 --- a/tests/auto/corelib/global/qflags/tst_qflags.cpp +++ b/tests/auto/corelib/global/qflags/tst_qflags.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2021 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 #ifdef QFLAGS_TEST_NO_TYPESAFE_FLAGS # ifdef QT_TYPESAFE_FLAGS @@ -301,7 +301,7 @@ Q_DECLARE_FLAGS( MyStrictNoOpFlags, MyStrictNoOpEnum ) static_assert( !QTypeInfo<MyStrictFlags>::isComplex ); static_assert( QTypeInfo<MyStrictFlags>::isRelocatable ); -static_assert( !QTypeInfo<MyStrictFlags>::isPointer ); +static_assert( !std::is_pointer_v<MyStrictFlags> ); void tst_QFlags::classEnum() { @@ -475,7 +475,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS( MyFlags ) static_assert( !QTypeInfo<MyFlags>::isComplex ); static_assert( QTypeInfo<MyFlags>::isRelocatable ); -static_assert( !QTypeInfo<MyFlags>::isPointer ); +static_assert( !std::is_pointer_v<MyFlags> ); QTEST_MAIN(tst_QFlags) #include "tst_qflags.moc" |