You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2009/05/21 04:28:30 UTC
svn commit: r776930 - in /incubator/thrift/trunk/test: DebugProtoTest.cpp
JSONProtoTest.cpp
Author: dreiss
Date: Thu May 21 02:28:30 2009
New Revision: 776930
URL: http://svn.apache.org/viewvc?rev=776930&view=rev
Log:
cpp: Resolve an ambiguous overload in some tests
sqrt is defined for floats and long doubles in addition to doubles.
Add a cast (from int) to specify which one we want.
Modified:
incubator/thrift/trunk/test/DebugProtoTest.cpp
incubator/thrift/trunk/test/JSONProtoTest.cpp
Modified: incubator/thrift/trunk/test/DebugProtoTest.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/DebugProtoTest.cpp?rev=776930&r1=776929&r2=776930&view=diff
==============================================================================
--- incubator/thrift/trunk/test/DebugProtoTest.cpp (original)
+++ incubator/thrift/trunk/test/DebugProtoTest.cpp Thu May 21 02:28:30 2009
@@ -47,7 +47,7 @@
n.my_ooe.integer16 = 16;
n.my_ooe.integer32 = 32;
n.my_ooe.integer64 = 64;
- n.my_ooe.double_precision = (std::sqrt(5)+1)/2;
+ n.my_ooe.double_precision = (std::sqrt(5.0)+1)/2;
n.my_ooe.some_characters = ":R (me going \"rrrr\")";
n.my_ooe.zomg_unicode = "\xd3\x80\xe2\x85\xae\xce\x9d\x20"
"\xd0\x9d\xce\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0\xb0\xcf\x81\xe2\x84\x8e"
Modified: incubator/thrift/trunk/test/JSONProtoTest.cpp
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/JSONProtoTest.cpp?rev=776930&r1=776929&r2=776930&view=diff
==============================================================================
--- incubator/thrift/trunk/test/JSONProtoTest.cpp (original)
+++ incubator/thrift/trunk/test/JSONProtoTest.cpp Thu May 21 02:28:30 2009
@@ -49,7 +49,7 @@
n.my_ooe.integer16 = 16;
n.my_ooe.integer32 = 32;
n.my_ooe.integer64 = 64;
- n.my_ooe.double_precision = (std::sqrt(5)+1)/2;
+ n.my_ooe.double_precision = (std::sqrt(5.0)+1)/2;
n.my_ooe.some_characters = ":R (me going \"rrrr\")";
n.my_ooe.zomg_unicode = "\xd3\x80\xe2\x85\xae\xce\x9d\x20"
"\xd0\x9d\xce\xbf\xe2\x85\xbf\xd0\xbe\xc9\xa1\xd0\xb3\xd0\xb0\xcf\x81\xe2\x84\x8e"