diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-08-04 17:31:48 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:08 -0300 |
commit | 08f29f0d8f456eb1f994b05c21fd04468c95329c (patch) | |
tree | 857a3dee162eec94d3ffd624ec4fba3f7c5e21d8 /tests/libsample/samplenamespace.cpp | |
parent | eda3572089e71e0c5065831438c4999486838547 (diff) |
Included tests for added function signatures very similar to already existing ones.
Specifically this causes the situation when there is in C++ a function
with an argument that is a reference to a Value Type, and the user adds
a very similar function with the same type, but passed as value.
Example:
C++ : function(const TYPE& a, int b)
Added: function(TYPE)
The return type of ShibokenGenerator::getArgumentReplacement() method
was modified, because the argument object is more useful than its index.
Diffstat (limited to 'tests/libsample/samplenamespace.cpp')
-rw-r--r-- | tests/libsample/samplenamespace.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/libsample/samplenamespace.cpp b/tests/libsample/samplenamespace.cpp index 0bcc5c2b2..922f26fa3 100644 --- a/tests/libsample/samplenamespace.cpp +++ b/tests/libsample/samplenamespace.cpp @@ -101,5 +101,16 @@ forceDecisorSideB(int a, const Point& pt, const Str& text, ObjectType* object) { } -} // namespace SampleNamespace +double +passReferenceToValueType(const Point& point, double multiplier) +{ + return (point.x() + point.y()) * multiplier; +} + +int +passReferenceToObjectType(const ObjectType& obj, int multiplier) +{ + return obj.objectName().size() * multiplier; +} +} // namespace SampleNamespace |