summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-17 14:52:44 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-02-01 17:28:07 -0200
commit81b6d4a6489e8b958418c7db3cccc2b480571af6 (patch)
tree199d8ccbcde89f1852545d5da33b8d3b27768453 /tests
parent5132ceaac226b604ba02d335fa10d95a0bda6d5b (diff)
downloadshiboken-81b6d4a6489e8b958418c7db3cccc2b480571af6.tar.gz
shiboken-81b6d4a6489e8b958418c7db3cccc2b480571af6.tar.xz
shiboken-81b6d4a6489e8b958418c7db3cccc2b480571af6.zip
Fix bug 616 - "error compiling when public and private methods differ by the const-ness"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Renato Ara├║jo <renato.filho@openbossa.org>
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 36b30f2b..0660f379 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 3421c0d5..abe982aa 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 63691605..faa940df 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"/>