Thrift: Added support for double type across all languages
Summary: Just for completeness cause I'm crazy. Let's never use these!
Notes: Also made thrift grammar support # style comments, so you can do this at the top of your files
#!/usr/local/bin/thrift --cpp
/**
* This is a thrift def file youc an invoke directly and gen code!
*/
blah
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664789 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/cpp/src/TestClient.cc b/test/cpp/src/TestClient.cc
index d340e26..e12b65b 100644
--- a/test/cpp/src/TestClient.cc
+++ b/test/cpp/src/TestClient.cc
@@ -99,6 +99,13 @@
printf("testI64(-34359738368)");
int64_t i64 = testClient.testI64(-34359738368LL);
printf(" = %ld\n", i64);
+
+ /**
+ * DOUBLE TEST
+ */
+ printf("testDouble(-5.2098523)");
+ double dub = testClient.testDouble(-5.2098523);
+ printf(" = %lf\n", dub);
/**
* STRUCT TEST
diff --git a/test/cpp/src/TestServer.cc b/test/cpp/src/TestServer.cc
index 63a7594..97d3440 100644
--- a/test/cpp/src/TestServer.cc
+++ b/test/cpp/src/TestServer.cc
@@ -47,6 +47,11 @@
return thing;
}
+ double testDouble(double thing) {
+ printf("testDouble(%lf)\n", thing);
+ return thing;
+ }
+
Xtruct testStruct(Xtruct thing) {
printf("testStruct({\"%s\", %d, %d, %ld})\n",
thing.string_thing.c_str(),