diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-19 11:20:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-06-19 14:06:03 +0200 |
commit | e82c56e86a5848dbaaa59ab1c47c15236657b197 (patch) | |
tree | 4f100e7a9890fa7fa2a414c497b45966536446af /sources/shiboken2/ApiExtractor/tests/testaddfunction.cpp | |
parent | edafc6353a2b03eab3ee67735727a9e95c5b29af (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.cpp | 2 |
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() |