diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-08-06 17:28:00 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:09 -0300 |
commit | 714ddb6c74b4db4853ca2e34bb50f2888e75ec8d (patch) | |
tree | 7d04cd087ad99fef6442f6be4fbe0342eb722682 /tests/libsample | |
parent | 8794f303c16f67812093d0311530b4447ff5c94c (diff) |
The type checking now pays attention to the <no-null-pointer/> tag.
An unit test was also added for it.
Diffstat (limited to 'tests/libsample')
-rw-r--r-- | tests/libsample/modifications.cpp | 6 | ||||
-rw-r--r-- | tests/libsample/modifications.h | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/libsample/modifications.cpp b/tests/libsample/modifications.cpp index 72c3f40ed..739ca5c74 100644 --- a/tests/libsample/modifications.cpp +++ b/tests/libsample/modifications.cpp @@ -103,3 +103,9 @@ Modifications::getSize(const void* data, int size) (void)data; return size; } + +int +Modifications::sumPointCoordinates(const Point* point) +{ + return point->x() + point->y(); +} diff --git a/tests/libsample/modifications.h b/tests/libsample/modifications.h index 1b6fb8240..c7a7748c6 100644 --- a/tests/libsample/modifications.h +++ b/tests/libsample/modifications.h @@ -98,6 +98,10 @@ public: // Replace 'const void*' by 'ByteArray&'. int getSize(const void* data, int size); + + // Mark the argument with a <no-null-pointer/> tag; + // the test implementation must expect point never to be null. + int sumPointCoordinates(const Point* point); }; class LIBSAMPLE_API AbstractModifications : public Modifications |