From 39d60ca63e6a2ecd8f611344c00c88090975b170 Mon Sep 17 00:00:00 2001 From: chrchr Date: Thu, 15 Jun 2023 18:53:42 +0200 Subject: [PATCH] Add test --- test/testtokenize.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/testtokenize.cpp b/test/testtokenize.cpp index 6dcf245be..2d00e507f 100644 --- a/test/testtokenize.cpp +++ b/test/testtokenize.cpp @@ -6944,6 +6944,13 @@ private: "};\n"), InternalError, "There is an unknown macro here somewhere. Configuration is required. If Q_SLOTS is a macro then please configure it."); + ASSERT_THROW_EQUALS(tokenizeAndStringify("class C : public QObject {\n" + " struct S { static void g() {} };\n" + "private slots:\n" + " void f() { S::g(); }\n" + "};\n"), + InternalError, + "There is an unknown macro here somewhere. Configuration is required. If slots is a macro then please configure it."); }