aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-05 13:55:56 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:08 -0300
commit50aef1dd4836b5019c60d31c54501ebcd37f72cd (patch)
tree3e9f41435c3ee0da5fdb5ee32b5b9900ad5a5259 /tests/libsample
parent08f29f0d8f456eb1f994b05c21fd04468c95329c (diff)
Improved guessCPythonCheckFunction method to produce an AbstractMetaType for known types.
This is in opposition of simply returning a string with a custom type check. The details are in the docstring in ShibokenGenerator header. Also added a new modification test and refactored here and there in the sample binding type system.
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/modifications.cpp7
-rw-r--r--tests/libsample/modifications.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/libsample/modifications.cpp b/tests/libsample/modifications.cpp
index 00a0cdf0c..72c3f40ed 100644
--- a/tests/libsample/modifications.cpp
+++ b/tests/libsample/modifications.cpp
@@ -96,3 +96,10 @@ Modifications::sumPointArray(int arraySize, const Point pointArray[])
point = point + pointArray[i];
return point;
}
+
+int
+Modifications::getSize(const void* data, int size)
+{
+ (void)data;
+ return size;
+}
diff --git a/tests/libsample/modifications.h b/tests/libsample/modifications.h
index 5f7b58995..1b6fb8240 100644
--- a/tests/libsample/modifications.h
+++ b/tests/libsample/modifications.h
@@ -95,6 +95,9 @@ public:
virtual const char* className();
Point sumPointArray(int arraySize, const Point pointArray[]);
+
+ // Replace 'const void*' by 'ByteArray&'.
+ int getSize(const void* data, int size);
};
class LIBSAMPLE_API AbstractModifications : public Modifications