aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp')
-rw-r--r--sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp b/sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp
index 766265def..8962f83ff 100644
--- a/sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp
+++ b/sources/shiboken2/ApiExtractor/tests/testinserttemplate.cpp
@@ -81,50 +81,4 @@ void TestInsertTemplate::testInsertTemplateOnModuleInjectCode()
QVERIFY(code.contains(QLatin1String("code template content")));
}
-void TestInsertTemplate::testInvalidTypeSystemTemplate()
-{
- const char* cppCode ="";
- const char* xmlCode = "\
- <typesystem package='Foo'>\n\
- <inject-code class='native'>\n\
- <insert-template name='this_code_template_does_not_exists'/>\n\
- </inject-code>\n\
- </typesystem>\n";
- QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode, false));
- QVERIFY(!builder.isNull());
- AbstractMetaClassList classes = builder->classes();
- QVERIFY(classes.isEmpty());
-
- TypeEntry* module = TypeDatabase::instance()->findType(QLatin1String("Foo"));
- QVERIFY(module);
- QCOMPARE(module->codeSnips().count(), 1);
- QString code = module->codeSnips().first().code().trimmed();
- QVERIFY(code.isEmpty());
-}
-
-void TestInsertTemplate::testValidAndInvalidTypeSystemTemplate()
-{
- const char* cppCode ="";
- const char* xmlCode = "\
- <typesystem package='Foo'>\n\
- <template name='code_template'>\n\
- code template content\n\
- </template>\n\
- <inject-code class='native'>\n\
- <insert-template name='this_code_template_does_not_exists'/>\n\
- <insert-template name='code_template'/>\n\
- </inject-code>\n\
- </typesystem>\n";
- QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode, false));
- QVERIFY(!builder.isNull());
- AbstractMetaClassList classes = builder->classes();
- QVERIFY(classes.isEmpty());
-
- TypeEntry* module = TypeDatabase::instance()->findType(QLatin1String("Foo"));
- QVERIFY(module);
- QCOMPARE(module->codeSnips().count(), 1);
- QString code = module->codeSnips().first().code().trimmed();
- QVERIFY(code.contains(QLatin1String("code template content")));
-}
-
QTEST_APPLESS_MAIN(TestInsertTemplate)