aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-19 11:20:12 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-06-19 14:06:03 +0200
commite82c56e86a5848dbaaa59ab1c47c15236657b197 (patch)
tree4f100e7a9890fa7fa2a414c497b45966536446af /sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
parentedafc6353a2b03eab3ee67735727a9e95c5b29af (diff)
shiboken2: Improve whitespaces formatting in injected code
- Trim newlines and dedent all snippets from XML - Move the trailing newlines into the code snippet function. - Do not indent preprocessor directives Change-Id: Ic8c3745f0b88ee4ed27ac9cbaf376d71a50d9188 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp b/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
index c50084b8e..ca4af9a10 100644
--- a/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp
@@ -283,7 +283,7 @@ void TestAddFunction::testAddFunctionAtModuleLevel()
QCOMPARE(mods.size(), 1);
QVERIFY(mods.first().isCodeInjection());
CodeSnip snip = mods.first().snips.first();
- QCOMPARE(snip.code(), QLatin1String("custom_code();"));
+ QCOMPARE(snip.code().trimmed(), QLatin1String("custom_code();"));
}
void TestAddFunction::testAddFunctionWithVarargs()