aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/ApiExtractor/tests/testremoveimplconv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken6/ApiExtractor/tests/testremoveimplconv.cpp')
-rw-r--r--sources/shiboken6/ApiExtractor/tests/testremoveimplconv.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/sources/shiboken6/ApiExtractor/tests/testremoveimplconv.cpp b/sources/shiboken6/ApiExtractor/tests/testremoveimplconv.cpp
deleted file mode 100644
index c0dfbcd79..000000000
--- a/sources/shiboken6/ApiExtractor/tests/testremoveimplconv.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright (C) 2016 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-#include "testremoveimplconv.h"
-#include "testutil.h"
-
-#include <abstractmetaargument.h>
-#include <abstractmetafunction.h>
-#include <abstractmetalang.h>
-#include <abstractmetatype.h>
-#include <complextypeentry.h>
-
-#include <QtTest/qtest.h>
-
-// When a constructor able to trigger implicity conversions is removed
-// it should not appear in the implicity conversion list.
-void TestRemoveImplConv::testRemoveImplConv()
-{
- const char cppCode[] = "\
- struct A {};\n\
- struct B {};\n\
- struct C {\n\
- C(const A&);\n\
- C(const B&);\n\
- };\n";
- const char xmlCode[] = "\
- <typesystem package=\"Foo\">\n\
- <value-type name='A'/>\n\
- <value-type name='B'/>\n\
- <value-type name='C'>\n\
- <modify-function signature='C(const A&amp;)' remove='all'/>\n\
- </value-type>\n\
- </typesystem>\n";
- QScopedPointer<AbstractMetaBuilder> builder(TestUtil::parse(cppCode, xmlCode));
- QVERIFY(builder);
- AbstractMetaClassList classes = builder->classes();
- QCOMPARE(classes.size(), 3);
- const auto classA = AbstractMetaClass::findClass(classes, "A");
- QVERIFY(classA);
- const auto classB = AbstractMetaClass::findClass(classes, "B");
- QVERIFY(classB);
- const auto classC = AbstractMetaClass::findClass(classes, "C");
- QVERIFY(classC);
- const auto implConv = classC->implicitConversions();
- QCOMPARE(implConv.size(), 1);
- QCOMPARE(implConv.constFirst()->arguments().constFirst().type().typeEntry(),
- classB->typeEntry());
-}
-
-QTEST_APPLESS_MAIN(TestRemoveImplConv)