THRIFT-2352 msvc failed to compile thrift tests
Patch: Sergei Nikulov & Roger Meier
diff --git a/lib/cpp/test/Benchmark.cpp b/lib/cpp/test/Benchmark.cpp
index 9ee2586..286d635 100644
--- a/lib/cpp/test/Benchmark.cpp
+++ b/lib/cpp/test/Benchmark.cpp
@@ -35,15 +35,15 @@
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 be8f426..a3259c0 100644
--- a/lib/cpp/test/JSONProtoTest.cpp
+++ b/lib/cpp/test/JSONProtoTest.cpp
@@ -134,7 +134,7 @@
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 e2bba40..3cb3478 100644
--- a/test/DebugProtoTest.thrift
+++ b/test/DebugProtoTest.thrift
@@ -27,7 +27,7 @@
3: double neginf,
4: double repeating,
5: double big,
- 6: double small,
+ 6: double tiny,
7: double zero,
8: double negzero,
}