diff options
Diffstat (limited to 'tests/auto/other/toolsupport')
-rw-r--r-- | tests/auto/other/toolsupport/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/auto/other/toolsupport/tst_toolsupport.cpp | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/auto/other/toolsupport/CMakeLists.txt b/tests/auto/other/toolsupport/CMakeLists.txt index 5bc6c5c16a..5b2cc0c0e2 100644 --- a/tests/auto/other/toolsupport/CMakeLists.txt +++ b/tests/auto/other/toolsupport/CMakeLists.txt @@ -1,12 +1,16 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -# Generated from toolsupport.pro. - ##################################################################### ## tst_toolsupport Test: ##################################################################### +if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT) + cmake_minimum_required(VERSION 3.16) + project(tst_toolsupport LANGUAGES CXX) + find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST) +endif() + qt_internal_add_test(tst_toolsupport SOURCES tst_toolsupport.cpp diff --git a/tests/auto/other/toolsupport/tst_toolsupport.cpp b/tests/auto/other/toolsupport/tst_toolsupport.cpp index 6a146bae3a..965b55977c 100644 --- a/tests/auto/other/toolsupport/tst_toolsupport.cpp +++ b/tests/auto/other/toolsupport/tst_toolsupport.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2015 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> @@ -38,6 +38,7 @@ template <typename T, typename K> size_t pmm_to_offsetof(T K:: *pmm) { #ifdef Q_CC_MSVC + // Even on 64 bit MSVC uses 4 byte offsets. quint32 ret; #else @@ -114,10 +115,10 @@ void tst_toolsupport::offsets_data() QTestData &data = QTest::newRow("QFilePrivate::fileName") << pmm_to_offsetof(&QFilePrivate::fileName); // Please heed the comment at the top of this file when changing one of these lines: -#ifdef Q_PROCESSOR_X86 +#ifdef Q_PROCESSOR_X86_32 // x86 32-bit has weird alignment rules. Refer to QtPrivate::AlignOf in // qglobal.h for more details. - data << 264 << 424; + data << 264 << -1; #else data << 300 << 424; #endif |