From f41cf0af8ed705d342ea448acac89659eea64bfd Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Wed, 9 Dec 2009 19:34:12 -0300 Subject: 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 --- tests/libsample/functions.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/libsample/functions.h') 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 -- cgit v1.2.3