diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor/tests')
4 files changed, 35 insertions, 38 deletions
diff --git a/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp b/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp index 7a52b9b33..0d05dfb30 100644 --- a/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp +++ b/sources/shiboken6/ApiExtractor/tests/testaddfunction.cpp @@ -421,20 +421,20 @@ void TestAddFunction::testAddFunctionWithApiVersion() void TestAddFunction::testModifyAddedFunction() { const char cppCode[] = "class Foo { };\n"; - const char xmlCode[] = "\ - <typesystem package='Package'>\n\ - <primitive-type name='float'/>\n\ - <primitive-type name='int'/>\n\ - <value-type name='Foo'>\n\ - <add-function signature='method(float, int)'>\n\ - <inject-code class='target' position='beginning'>custom_code();</inject-code>\n\ - <modify-argument index='2'>\n\ - <replace-default-expression with='0'/>\n\ - <rename to='varName'/>\n\ - </modify-argument>\n\ - </add-function>\n\ - </value-type>\n\ - </typesystem>\n"; + const char xmlCode[] = R"( +<typesystem package='Package'> + <primitive-type name='float'/> + <primitive-type name='int'/> + <value-type name='Foo'> + <add-function signature='method(float, int)'> + <inject-code class='target' position='beginning'>custom_code();</inject-code> + <modify-argument index='2' rename='varName'> + <replace-default-expression with='0'/> + </modify-argument> + </add-function> + </value-type> +</typesystem> +)"; QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode)); QVERIFY(!builder.isNull()); AbstractMetaClassList classes = builder->classes(); diff --git a/sources/shiboken6/ApiExtractor/tests/testdroptypeentries.cpp b/sources/shiboken6/ApiExtractor/tests/testdroptypeentries.cpp index 20b0c12e0..c47c7232f 100644 --- a/sources/shiboken6/ApiExtractor/tests/testdroptypeentries.cpp +++ b/sources/shiboken6/ApiExtractor/tests/testdroptypeentries.cpp @@ -121,14 +121,13 @@ static const char* cppCode2 ="\ void func();\n\ };\n"; -static const char* xmlCode2 = "\ -<typesystem package='Foo'>\n\ - <value-type name='ValueA'>\n\ - <modify-function signature='func()'>\n\ - <remove class='all'/>\n\ - </modify-function>\n\ - </value-type>\n\ -</typesystem>\n"; +static const char* xmlCode2 = R"( +<typesystem package='Foo'> + <value-type name='ValueA'> + <modify-function signature='func()' remove='all'/> + </value-type> +</typesystem> +)"; void TestDropTypeEntries::testDropEntryWithChildTags() { diff --git a/sources/shiboken6/ApiExtractor/tests/testimplicitconversions.cpp b/sources/shiboken6/ApiExtractor/tests/testimplicitconversions.cpp index 928122967..9dcdec975 100644 --- a/sources/shiboken6/ApiExtractor/tests/testimplicitconversions.cpp +++ b/sources/shiboken6/ApiExtractor/tests/testimplicitconversions.cpp @@ -73,15 +73,14 @@ void TestImplicitConversions::testWithModifiedVisibility() A(const B&);\n\ };\n\ class B {};\n"; - const char* xmlCode = "\ - <typesystem package='Foo'>\n\ - <value-type name='A'>\n\ - <modify-function signature='A(const B&)'>\n\ - <access modifier='private'/>\n\ - </modify-function>\n\ - </value-type>\n\ - <value-type name='B'/>\n\ - </typesystem>\n"; + const char* xmlCode = R"( +<typesystem package='Foo'> + <value-type name='A'> + <modify-function signature='A(const B&)' access='private'/> + </value-type> + <value-type name='B'/> +</typesystem> +)"; QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode)); QVERIFY(!builder.isNull()); AbstractMetaClassList classes = builder->classes(); diff --git a/sources/shiboken6/ApiExtractor/tests/testmodifyfunction.cpp b/sources/shiboken6/ApiExtractor/tests/testmodifyfunction.cpp index 0fa07b75c..ebee345a0 100644 --- a/sources/shiboken6/ApiExtractor/tests/testmodifyfunction.cpp +++ b/sources/shiboken6/ApiExtractor/tests/testmodifyfunction.cpp @@ -54,13 +54,12 @@ void TestModifyFunction::testRenameArgument() <primitive-type name='int'/>\n\ <object-type name='A'>\n\ <modify-function signature='"; - const char xmlCode2[] = "'>\n\ - <modify-argument index='1'>\n\ - <rename to='otherArg'/>\n\ - </modify-argument>\n\ - </modify-function>\n\ - </object-type>\n\ - </typesystem>\n"; + const char xmlCode2[] = R"('> + <modify-argument index='1' rename='otherArg'/> + </modify-function> + </object-type> + </typesystem> +)"; const QByteArray xmlCode = QByteArray(xmlCode1) + pattern + QByteArray(xmlCode2); QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode.constData(), false)); |