aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-04-29 18:41:50 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-30 09:46:49 -0300
commitd402db5680452241a5b85f7a4fd7db9bcc9ddbb8 (patch)
treed6060572479ded20796bd848f6e816539eeddda5 /tests/libsample
parent902c70b6f34c6c712d867047d2e58ac41864c0be (diff)
Adding test for #212 - Overloads with enums
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/objecttype.cpp7
-rw-r--r--tests/libsample/objecttype.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/libsample/objecttype.cpp b/tests/libsample/objecttype.cpp
index d5bdace14..5ff3c2f19 100644
--- a/tests/libsample/objecttype.cpp
+++ b/tests/libsample/objecttype.cpp
@@ -226,3 +226,10 @@ unsigned int objectTypeHash(const ObjectType* objectType)
return reinterpret_cast<std::size_t>(objectType);
}
+unsigned char ObjectType::callWithEnum(const Str& prefix, Event::EventType type, unsigned char value){
+ return value*value;
+}
+
+unsigned char ObjectType::callWithEnum(const Str& prefix, unsigned char value) {
+ return value;
+}
diff --git a/tests/libsample/objecttype.h b/tests/libsample/objecttype.h
index 0515ecc98..8b9eda117 100644
--- a/tests/libsample/objecttype.h
+++ b/tests/libsample/objecttype.h
@@ -97,6 +97,9 @@ public:
// This method should be reimplemented by ObjectTypeLayout.
virtual bool isLayoutType() { return false; }
+ unsigned char callWithEnum(const Str& prefix, Event::EventType type, unsigned char value=80);
+ unsigned char callWithEnum(const Str& prefix, unsigned char value=0);
+
private:
ObjectType(const ObjectType&);
ObjectType& operator=(const ObjectType&);