summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/IceUtil/Config.h2
-rw-r--r--cpp/test/Ice/operations/Twoways.cpp12
-rw-r--r--cpp/test/Ice/operations/TwowaysAMI.cpp18
-rw-r--r--cpp/test/IceUtil/inputUtil/Client.cpp6
4 files changed, 20 insertions, 18 deletions
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index 859a36db279..f0235c83b44 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -121,10 +121,12 @@ private:
typedef __int64 Int64;
const Int64 Int64Min = -9223372036854775808i64;
const Int64 Int64Max = 9223372036854775807i64;
+#define ICE_INT64(x) Int64(x##i64)
#elif defined(__linux__) && defined(i386)
typedef long long Int64;
const Int64 Int64Min = -0x7fffffffffffffffLL-1LL;
const Int64 Int64Max = 0x7fffffffffffffffLL;
+#define ICE_INT64(x) Int64(x##LL)
#endif
}
diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp
index 98d0b5516aa..bdcbbdb7b4d 100644
--- a/cpp/test/Ice/operations/Twoways.cpp
+++ b/cpp/test/Ice/operations/Twoways.cpp
@@ -516,11 +516,11 @@ twoways(const Test::MyClassPrx& p)
{
Test::LongFloatD di1;
di1[999999110] = Ice::Float(-1.1);
- di1[9999991100] = Ice::Float(123123.2);
+ di1[999999111] = Ice::Float(123123.2);
Test::LongFloatD di2;
di2[999999110] = Ice::Float(-1.1);
- di2[999999111] = Ice::Float(-100.4);
- di2[9999991101] = Ice::Float(0.5);
+ di2[999999120] = Ice::Float(-100.4);
+ di2[999999130] = Ice::Float(0.5);
Test::LongFloatD _do;
Test::LongFloatD ro = p->opLongFloatD(di1, di2, _do);
@@ -528,9 +528,9 @@ twoways(const Test::MyClassPrx& p)
test(_do == di1);
test(ro.size() == 4);
test(ro[999999110] == Ice::Float(-1.1));
- test(ro[999999111] == Ice::Float(-100.4));
- test(ro[9999991100] == Ice::Float(123123.2));
- test(ro[9999991101] == Ice::Float(0.5));
+ test(ro[999999120] == Ice::Float(-100.4));
+ test(ro[999999111] == Ice::Float(123123.2));
+ test(ro[999999130] == Ice::Float(0.5));
}
{
diff --git a/cpp/test/Ice/operations/TwowaysAMI.cpp b/cpp/test/Ice/operations/TwowaysAMI.cpp
index 603af56b7aa..ca25c66c146 100644
--- a/cpp/test/Ice/operations/TwowaysAMI.cpp
+++ b/cpp/test/Ice/operations/TwowaysAMI.cpp
@@ -616,17 +616,17 @@ public:
{
Test::LongFloatD di1;
di1[999999110] = Ice::Float(-1.1);
- di1[9999991100] = Ice::Float(123123.2);
+ di1[999999111] = Ice::Float(123123.2);
test(_do == di1);
test(ro.size() == 4);
test(ro.find(999999110) != ro.end());
test(ro.find(999999110)->second == Ice::Float(-1.1));
+ test(ro.find(999999120) != ro.end());
+ test(ro.find(999999120)->second == Ice::Float(-100.4));
test(ro.find(999999111) != ro.end());
- test(ro.find(999999111)->second == Ice::Float(-100.4));
- test(ro.find(9999991100) != ro.end());
- test(ro.find(9999991100)->second == Ice::Float(123123.2));
- test(ro.find(9999991101) != ro.end());
- test(ro.find(9999991101)->second == Ice::Float(0.5));
+ test(ro.find(999999111)->second == Ice::Float(123123.2));
+ test(ro.find(999999130) != ro.end());
+ test(ro.find(999999130)->second == Ice::Float(0.5));
called();
}
@@ -955,11 +955,11 @@ twowaysAMI(const Test::MyClassPrx& p)
{
Test::LongFloatD di1;
di1[999999110] = Ice::Float(-1.1);
- di1[9999991100] = Ice::Float(123123.2);
+ di1[999999111] = Ice::Float(123123.2);
Test::LongFloatD di2;
di2[999999110] = Ice::Float(-1.1);
- di2[999999111] = Ice::Float(-100.4);
- di2[9999991101] = Ice::Float(0.5);
+ di2[999999120] = Ice::Float(-100.4);
+ di2[999999130] = Ice::Float(0.5);
AMI_MyClass_opLongFloatDIPtr cb = new AMI_MyClass_opLongFloatDI;
p->opLongFloatD_async(cb, di1, di2);
diff --git a/cpp/test/IceUtil/inputUtil/Client.cpp b/cpp/test/IceUtil/inputUtil/Client.cpp
index eb62d4e7a6a..1662dcfe84e 100644
--- a/cpp/test/IceUtil/inputUtil/Client.cpp
+++ b/cpp/test/IceUtil/inputUtil/Client.cpp
@@ -78,21 +78,21 @@ main(int, char**)
test(!b && result == 0 && pos == 1);
b = stringToInt64("-9223372036854775807", result, pos);
- test(b && result == -9223372036854775807 && pos == string::npos);
+ test(b && result == ICE_INT64(-9223372036854775807) && pos == string::npos);
b = stringToInt64("-9223372036854775808", result, pos);
test(b && result == Int64Min && pos == string::npos);
b = stringToInt64("-9223372036854775809", result, pos);
test(!b && result == Int64Min && pos == string::npos);
b = stringToInt64("9223372036854775806", result, pos);
- test(b && result == 9223372036854775806 && pos == string::npos);
+ test(b && result == ICE_INT64(9223372036854775806) && pos == string::npos);
b = stringToInt64("9223372036854775807", result, pos);
test(b && result == Int64Max && pos == string::npos);
b = stringToInt64("9223372036854775808", result, pos);
test(!b && result == Int64Max && pos == string::npos);
b = stringToInt64("-9223372036854775807Q", result, pos);
- test(b && result == -9223372036854775807 && pos == 20);
+ test(b && result == ICE_INT64(-9223372036854775807) && pos == 20);
b = stringToInt64("-9223372036854775808Q", result, pos);
test(b && result == Int64Min && pos == 20);
b = stringToInt64("-9223372036854775809Q", result, pos);