New issue
Advanced search Search tips

Issue 693246 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

More info from failed should().beCloseToArray()

Project Member Reported by rtoy@chromium.org, Feb 16 2017

Issue description

Currently, if should().beCloseToArray() fails, you get something like:

FAIL X Rendered audio does not equal [0.00634784996509552,0.007568590342998505,0.007690664380788803,0.00906399730592966,0.009155552834272385,0.009247108362615108,0.009002960287034512,0.008880886249244213,0.008514664135873318,0.008209479041397572,0.007568590342998505,0.007751701399683952,0.007751701399683952,0.008026367984712124,0.008423108607530594,0.008362071588635445...] with an element-wise tolerance of {"absoluteThreshold":0,"relativeThreshold":0}.
	Index	Actual			Expected		AbsError		RelError		Test threshold
	[57]	1.6174856573343277e-3	1.6174810007214546e-3	4.6566128730773926e-9	2.8789289463062480e-6	0.0000000000000000e+0
	[58]	1.2207552790641785e-3	1.2207403779029846e-3	1.4901161193847656e-8	1.2206658732338491e-5	0.0000000000000000e+0
	[59]	4.8832967877388000e-4	4.8829615116119385e-4	3.3527612686157227e-8	6.8662455369404010e-5	0.0000000000000000e+0
	[60]	1.5263631939888000e-4	1.5259254723787308e-4	4.3772161006927490e-8	2.8685648020995453e-4	0.0000000000000000e+0
	[61]	-3.0466355383396149e-5	-3.0517578125000000e-5	5.1222741603851318e-8	1.6784667968750000e-3	0.0000000000000000e+0
	Max AbsError of 4.5150518417358398e-6 at index of 61170.
	Max RelError of Infinity at index of 4769. assert_true: expected true got false

This is fine, but look at the message of where the max abserror and relerror occurred at.  It would be nice if the data for index 61170 and 4769 were also printed out to get a feeling of why this error occurred.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/29590e9db1219d95b6713ee229a758449bc62c73

commit 29590e9db1219d95b6713ee229a758449bc62c73
Author: rtoy <rtoy@chromium.org>
Date: Tue Feb 21 19:13:04 2017

Print additional information on failed beCloseToArray tests

When a beCloseToArray test fails, print out the detailed information
for the entries with the max absolute error and max relative error.

We also refactored some common printing and threshold code into their
own functions to ensure the format is consistent.

Finally, also print out how many failures were not printed in the
list.

BUG= 693246 
TEST=audit-failures.html

Review-Url: https://codereview.chromium.org/2700973003
Cr-Commit-Position: refs/heads/master@{#451815}

[modify] https://crrev.com/29590e9db1219d95b6713ee229a758449bc62c73/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
[modify] https://crrev.com/29590e9db1219d95b6713ee229a758449bc62c73/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
[modify] https://crrev.com/29590e9db1219d95b6713ee229a758449bc62c73/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html

Comment 2 by rtoy@chromium.org, Feb 27 2017

Owner: rtoy@chromium.org
Status: Fixed (was: Available)

Sign in to add a comment