Title: [149548] trunk/PerformanceTests/SunSpider
- Revision
- 149548
- Author
- [email protected]
- Date
- 2013-05-03 19:11:49 -0700 (Fri, 03 May 2013)
Log Message
SunSpider 1.0: 3d-morph: use epsilon to check result
https://bugs.webkit.org/show_bug.cgi?id=115553
Patch by Cosmin Truta <[email protected]> on 2013-05-03
Reviewed by George Staikos.
SunSpider/3d-morph should be more lenient in validating its results, since they depend on Math.sin, which isn't formally specified.
* tests/sunspider-1.0/3d-morph.js:
Modified Paths
Diff
Modified: trunk/PerformanceTests/SunSpider/ChangeLog (149547 => 149548)
--- trunk/PerformanceTests/SunSpider/ChangeLog 2013-05-04 02:07:30 UTC (rev 149547)
+++ trunk/PerformanceTests/SunSpider/ChangeLog 2013-05-04 02:11:49 UTC (rev 149548)
@@ -1,3 +1,14 @@
+2013-05-03 Cosmin Truta <[email protected]>
+
+ SunSpider 1.0: 3d-morph: use epsilon to check result
+ https://bugs.webkit.org/show_bug.cgi?id=115553
+
+ Reviewed by George Staikos.
+
+ SunSpider/3d-morph should be more lenient in validating its results, since they depend on Math.sin, which isn't formally specified.
+
+ * tests/sunspider-1.0/3d-morph.js:
+
2013-04-19 Filip Pizlo <[email protected]>
SunSpider/string-tagcloud should be more lenient in validating its results, since they depend on Math.log, which isn't formally specified
Modified: trunk/PerformanceTests/SunSpider/tests/sunspider-1.0/3d-morph.js (149547 => 149548)
--- trunk/PerformanceTests/SunSpider/tests/sunspider-1.0/3d-morph.js 2013-05-04 02:07:30 UTC (rev 149547)
+++ trunk/PerformanceTests/SunSpider/tests/sunspider-1.0/3d-morph.js 2013-05-04 02:11:49 UTC (rev 149548)
@@ -58,6 +58,6 @@
// says - that sin() has to return a value within 1 ulp of exact - then we still
// would not be able to do an exact test here since that would allow for just enough
// low-bit slop to create possibly big errors due to testOutput being a sum.
-var expected = 6;
-if (("" + testOutput)[0] != expected)
- throw "Error: bad test output: expected leading digit to be " + expected + " but got " + testOutput;
+var epsilon = 1e-13;
+if (Math.abs(testOutput) >= epsilon)
+ throw "Error: bad test output: expected magnitude below " + epsilon + " but got " + testOutput;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes