aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/libsample/overload.h18
-rw-r--r--tests/samplebinding/CMakeLists.txt1
-rw-r--r--tests/samplebinding/typesystem_sample.xml13
3 files changed, 26 insertions, 6 deletions
diff --git a/tests/libsample/overload.h b/tests/libsample/overload.h
index 36b30f2be..0660f3799 100644
--- a/tests/libsample/overload.h
+++ b/tests/libsample/overload.h
@@ -61,5 +61,23 @@ public:
void singleOverload(Point* x) {}
Point* singleOverload() {return new Point();}
};
+
+class LIBSAMPLE_API Overload2 : public Overload
+{
+public:
+ // test bug#616, public and private method differ only by const
+ void doNothingInPublic() const {}
+ void doNothingInPublic(int) {}
+ virtual void doNothingInPublic3() const {}
+ void doNothingInPublic3(int) const {}
+protected:
+ void doNothingInPublic2() const {}
+ void doNothingInPublic2(int) {}
+private:
+ void doNothingInPublic() {}
+ void doNothingInPublic2() {}
+ void doNothingInPublic3() {}
+};
+
#endif // OVERLOAD_H
diff --git a/tests/samplebinding/CMakeLists.txt b/tests/samplebinding/CMakeLists.txt
index 3421c0d5e..abe982aab 100644
--- a/tests/samplebinding/CMakeLists.txt
+++ b/tests/samplebinding/CMakeLists.txt
@@ -51,6 +51,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/sample/objectview_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/objtypereference_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/oddbooluser_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/overload_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/sample/overload2_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/pairuser_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/pen_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/sample/point_wrapper.cpp
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 636916057..faa940dfb 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -1101,7 +1101,7 @@
<value-type name="NoImplicitConversion" />
<value-type name="NonDefaultCtor" />
<value-type name="OddBoolUser" />
- <value-type name="Overload">
+ <object-type name="Overload">
<enum-type name="FunctionEnum"/>
<enum-type name="ParamEnum"/>
<modify-function signature="intOverloads(int, int, double)">
@@ -1117,7 +1117,8 @@
<define-ownership owner="c++"/>
</modify-argument>
</modify-function>
- </value-type>
+ </object-type>
+ <object-type name="Overload2" />
<object-type name="Collector" stream="yes"/>
<value-type name="IntWrapper" />
@@ -1220,11 +1221,11 @@
<object-type name="PrivateDtor" />
<object-type name="Base1"/>
- <interface-type name="Base2"/>
+ <object-type name="Base2"/>
<object-type name="Base3"/>
- <interface-type name="Base4"/>
- <interface-type name="Base5"/>
- <interface-type name="Base6"/>
+ <object-type name="Base4"/>
+ <object-type name="Base5"/>
+ <object-type name="Base6"/>
<object-type name="MDerived1"/>
<object-type name="MDerived2"/>
<object-type name="MDerived3"/>