aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/nondefaultctor.h
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2009-09-01 19:03:07 -0300
committerHugo Lima <hugo.lima@openbossa.org>2009-09-01 19:03:07 -0300
commit5db89848578a416d2904317bc6cc361c3409af2c (patch)
tree806ddc4aa5a3a674e12c12770b6c863dee62f653 /tests/libsample/nondefaultctor.h
parent4d15d6c9527e078921d32ddcdbdec782e1d787f8 (diff)
Added a python test to classes without default ctor
Diffstat (limited to 'tests/libsample/nondefaultctor.h')
-rw-r--r--tests/libsample/nondefaultctor.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/libsample/nondefaultctor.h b/tests/libsample/nondefaultctor.h
index da0a14e0d..200d0ba9b 100644
--- a/tests/libsample/nondefaultctor.h
+++ b/tests/libsample/nondefaultctor.h
@@ -37,11 +37,17 @@
class NonDefaultCtor
{
+ int m_value;
public:
- NonDefaultCtor(int)
+ NonDefaultCtor(int value) : m_value(value)
{
}
+ int value()
+ {
+ return m_value;
+ }
+
NonDefaultCtor returnMyself()
{
return *this;
@@ -64,7 +70,7 @@ public:
NonDefaultCtor callReturnMyselfVirtual()
{
- return *this;
+ return returnMyselfVirtual();
}
};