Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(497)

Unified Diff: src/core/test/int64x64-test-suite.cc

Issue 342120043: New patch for core module changes (Closed)
Patch Set: Update for review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/model/win32-system-wall-clock-ms.cc ('k') | src/core/wscript » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/test/int64x64-test-suite.cc
===================================================================
--- a/src/core/test/int64x64-test-suite.cc
+++ b/src/core/test/int64x64-test-suite.cc
@@ -997,13 +997,22 @@
const int64x64_t result = int64x64_t (value);
// Make tolerance depend on magnitude of value
+#ifndef _MSC_VER
long double epsilon = std::numeric_limits<long double>::epsilon ();
+#else
+ long double epsilon = std::numeric_limits<double>::epsilon();
+#endif
long double margin = 0;
if (int64x64_t::implementation == int64x64_t::ld_impl)
{
// Darwin 12.5.0 (Mac 10.8.5) g++ 4.2.1
margin = 1.0;
}
+#ifdef _MSC_VER
+ // Visual Studio compiler uses 64-bit doubles for long doubles
+ // Need non-zero margin to ensure final tolerance is non-zero
+ margin = 1.0;
+#endif
if (RUNNING_ON_VALGRIND)
{
// Valgrind uses 64-bit doubles for long doubles
« no previous file with comments | « src/core/model/win32-system-wall-clock-ms.cc ('k') | src/core/wscript » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b