aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-10-24 16:22:32 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:18:31 -0300
commit121373c06d6b99a6614c7577c17812dec2237895 (patch)
tree95550531c7fe24df7a73502a145b31a831373d84 /tests/libsample
parentc995a7d382e1a51b0898939e51ff18dabdac027d (diff)
Fixed generation for enum arguments with default values when avoiding the protected hack.
Also added an unit test.
Diffstat (limited to 'tests/libsample')
-rw-r--r--tests/libsample/samplenamespace.cpp6
-rw-r--r--tests/libsample/samplenamespace.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/tests/libsample/samplenamespace.cpp b/tests/libsample/samplenamespace.cpp
index 922f26fa3..5b3b5302a 100644
--- a/tests/libsample/samplenamespace.cpp
+++ b/tests/libsample/samplenamespace.cpp
@@ -50,6 +50,12 @@ enumInEnumOut(InValue in)
return retval;
}
+Option
+enumArgumentWithDefaultValue(Option opt)
+{
+ return opt;
+}
+
int
getNumber(Option opt)
{
diff --git a/tests/libsample/samplenamespace.h b/tests/libsample/samplenamespace.h
index 88269b454..d75afd821 100644
--- a/tests/libsample/samplenamespace.h
+++ b/tests/libsample/samplenamespace.h
@@ -78,6 +78,8 @@ enum {
LIBSAMPLE_API OutValue enumInEnumOut(InValue in);
+LIBSAMPLE_API Option enumArgumentWithDefaultValue(Option opt = UnixTime);
+
LIBSAMPLE_API int getNumber(Option opt);
inline double powerOfTwo(double num) {