summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@qt.io>2024-04-25 11:28:13 +0000
committerTopi Reinio <topi.reinio@qt.io>2024-04-25 15:41:49 +0000
commit406c5201e326f9429367928a34e9ca1c9fc6b800 (patch)
treecba2dffda93de84dbaa53386307dd408a780ef90
parent70f1c85c0a60ac80f088abdff08edfa902cca38f (diff)
qdoc: validatedQDocOutput autotest: Stop relying on standard library
Two test cases used #include statements from the standard library. However, the test setup does not ensure that all required include paths are actually forwarded to QDoc and on to Clang. Some versions of Clang are able to correctly guess the include path(s) on some platforms/configurations, but we cannot rely on that always being the case. Replace the std lib includes with dummy declarations that should produce identical results in the expected output. Change-Id: I6f6b1bb9b176f7fa59ccdfc64c11e1586409eb5a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
-rw-r--r--src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/proxypage/src/proxy.h5
-rw-r--r--src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/proxypage/src/proxy.h b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/proxypage/src/proxy.h
index 5d4835fc9..05a17f826 100644
--- a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/proxypage/src/proxy.h
+++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/proxypage/src/proxy.h
@@ -2,7 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
-#include <utility>
+// dummy declaration
+namespace std {
+ template<class T1, class T2> struct pair;
+}
template <class T1, class T2>
using StdPair = std::pair<T1, T2>;
diff --git a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h
index 827a25da5..c745ccad2 100644
--- a/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h
+++ b/src/qdoc/qdoc/tests/validateqdocoutputfiles/testdata/templatedcallables/src/templated_callables.h
@@ -2,7 +2,10 @@
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#pragma once
-#include <array>
+// dummy declaration
+namespace std {
+ template <class T, int N> struct array;
+}
template <typename T>
class TemplatedClass