Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Unified Diff: test/mjsunit/mjsunit.js

Issue 66703005: Increase precision when finding the remainder after division by pi/2. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/math.js ('k') | test/mjsunit/sin-cos.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/mjsunit.js
diff --git a/test/mjsunit/mjsunit.js b/test/mjsunit/mjsunit.js
index 129353730ce1a8a4f111651294fb1e6cb7dc8b55..e5fb6c2586e4823297faf13e3e5baa69cb210eb5 100644
--- a/test/mjsunit/mjsunit.js
+++ b/test/mjsunit/mjsunit.js
@@ -54,6 +54,10 @@ var assertSame;
// and the properties of non-Array objects).
var assertEquals;
+
+// The difference between expected and found value is within certain tolerance.
+var assertEqualsDelta;
+
// The found object is an Array with the same length and elements
// as the expected object. The expected object doesn't need to be an Array,
// as long as it's "array-ish".
@@ -247,6 +251,12 @@ var assertUnoptimized;
};
+ assertEqualsDelta =
+ function assertEqualsDelta(expected, found, delta, name_opt) {
+ assertTrue(Math.abs(expected - found) <= delta, name_opt);
+ };
+
+
assertArrayEquals = function assertArrayEquals(expected, found, name_opt) {
var start = "";
if (name_opt) {
« no previous file with comments | « src/math.js ('k') | test/mjsunit/sin-cos.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698