aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2013-11-10 17:09:31 -0500
committerJohn Ehresman <jpe@wingware.com>2014-04-16 00:40:02 +0200
commit35d006a7bf9b33807c1df93f5f9439ff83cd32c0 (patch)
treec5a9359e631251dd3d5c6a09a159de08b64c7aa3 /tests/samplebinding
parent5b39f7fd9e216dd16e32ee5950d8d3d781cf1d17 (diff)
Fix function rejections (i.e. support overloads)
Add an additional check to AbstractMetaBuilder::traverseFunction to also perform a quick-and-dirty construction of the function signature, and to check that against the rejections. Add a unit test for matching full signatures. Before, we were only testing the function name; as a result, a rejection like 'foo()' would never match (because the name does not have ()'s). This is especially helpful for rejecting specific overloads of functions while allowing others to be wrapped normally. (The unit test shows a not-so-far-fetched example why one might want to do this.) The signature building logic isn't very sophisticated and likely requires a very exacting match to the signature as it appears in the wrapped sources, but that's likely not a serious issue, and at any rate this is much better than not being able to match overloads at all. Change-Id: Ic686377477aacf54f79c7bd2013e9aea8521a4ea Reviewed-by: John Ehresman <jpe@wingware.com>
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/typesystem_sample.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index dee028596..5da6ad148 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -2393,6 +2393,11 @@
<rejection class="ListUser" function-name="sumList(std::list&lt;int&gt;)"/>
<rejection class="ListUser" function-name="sumList(std::list&lt;double&gt;)"/>
+ <!-- test rejections using full signatures; this method is a template and
+ cannot be wrapped, but is otherwise recognized by shiboken and will
+ result in a compile error if the rejection is not matched -->
+ <rejection class="Photon::Base" function-name="isType()"/>
+
<value-type name="ValueAndVirtual" />
<object-type name="ObjectTypeByValue" />