aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libsample/functions.h
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2009-12-09 19:34:12 -0300
committerLauro Neto <lauro.neto@openbossa.org>2009-12-16 15:33:02 -0300
commitf41cf0af8ed705d342ea448acac89659eea64bfd (patch)
treef6f52ed4f28f7fa5b207d4b6a4ad868b23bca50d /tests/libsample/functions.h
parent61570eb7e4ce1ed0f926425d87d26dc3fdb81729 (diff)
Tests for numerical implicit conversions and fixes
Added a test for simple implicit numerical conversions involving doubles, signed and unsigned ints and longs. Some fixes to the converters were also made, mostly related to adding manual checks for boundaries with doubles for negative values Also put the overflow check in a single template Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'tests/libsample/functions.h')
-rw-r--r--tests/libsample/functions.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libsample/functions.h b/tests/libsample/functions.h
index 2629d3907..52a26a7a6 100644
--- a/tests/libsample/functions.h
+++ b/tests/libsample/functions.h
@@ -74,5 +74,11 @@ LIBSAMPLE_API GlobalOverloadFuncEnum overloadedFunc(double val);
LIBSAMPLE_API unsigned int doubleUnsignedInt(unsigned int value);
+LIBSAMPLE_API int acceptInt(int x);
+LIBSAMPLE_API unsigned int acceptUInt(unsigned int x);
+LIBSAMPLE_API long acceptLong(long x);
+LIBSAMPLE_API unsigned long acceptULong(unsigned long x);
+LIBSAMPLE_API double acceptDouble(double x);
+
#endif // FUNCTIONS_H