From 22888ce3a84f38c1478f38ad0d1ff3ed7fdf5f39 Mon Sep 17 00:00:00 2001 From: Roger Meier Date: Sun, 9 Feb 2014 11:31:02 +0100 Subject: [PATCH] THRIFT-2352 msvc failed to compile thrift tests Patch: Sergei Nikulov & Roger Meier --- lib/cpp/test/Benchmark.cpp | 6 +++--- lib/cpp/test/JSONProtoTest.cpp | 2 +- test/DebugProtoTest.thrift | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp index 9ee25866..286d6357 100644 --- a/lib/cpp/test/Benchmark.cpp +++ b/lib/cpp/test/Benchmark.cpp @@ -35,15 +35,15 @@ public: timeval vStart; Timer() { - gettimeofday(&vStart, 0); + THRIFT_GETTIMEOFDAY(&vStart, 0); } void start() { - gettimeofday(&vStart, 0); + THRIFT_GETTIMEOFDAY(&vStart, 0); } double frame() { timeval vEnd; - gettimeofday(&vEnd, 0); + THRIFT_GETTIMEOFDAY(&vEnd, 0); double dstart = vStart.tv_sec + ((double)vStart.tv_usec / 1000000.0); double dend = vEnd.tv_sec + ((double)vEnd.tv_usec / 1000000.0); return dend - dstart; diff --git a/lib/cpp/test/JSONProtoTest.cpp b/lib/cpp/test/JSONProtoTest.cpp index be8f4265..a3259c08 100644 --- a/lib/cpp/test/JSONProtoTest.cpp +++ b/lib/cpp/test/JSONProtoTest.cpp @@ -134,7 +134,7 @@ int main() { dub.neginf = -HUGE_VAL; dub.repeating = 10.0/3.0; dub.big = 1E+305; - dub.small = 1E-305; + dub.tiny = 1E-305; dub.zero = 0.0; dub.negzero = -0.0; cout << apache::thrift::ThriftJSONString(dub) << endl << endl; diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift index e2bba40e..3cb3478e 100644 --- a/test/DebugProtoTest.thrift +++ b/test/DebugProtoTest.thrift @@ -27,7 +27,7 @@ struct Doubles { 3: double neginf, 4: double repeating, 5: double big, - 6: double small, + 6: double tiny, 7: double zero, 8: double negzero, } -- 2.17.1