New issue
Advanced search Search tips

Issue 719716 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Should.beConstantValueOf should print out more info on failure.

Project Member Reported by rtoy@chromium.org, May 8 2017

Issue description

If you have something like

x = new Float32Array(10);
x[0] = 1;

should(x, "Expected difference").beConstantValueOf(0)

Audit prints out some message like

FAIL X Expected 0 for all values but found 1 unexpected values: 
	Index	Actual
	[0]	1

Note that the string description ("Expected difference") isn't printed anywhere.  It would be useful if it were to help identify which of many beConstantValueOf test failed.

Thus, maybe somethlng like

FAIL X Expected difference expected to be 0 for all values but found 1 unexpected values: 

That makes it easier to determine what was expected to be constant.

 

Comment 1 by rtoy@chromium.org, May 8 2017

Description: Show this description

Comment 2 by rtoy@chromium.org, Nov 2 2017

Owner: rtoy@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Nov 3 2017

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

commit 0478028f33620d1745f0d864b38064cf9674e53f
Author: Raymond Toy <rtoy@chromium.org>
Date: Fri Nov 03 01:32:30 2017

Print out user message if beConstantValueOf fails

Update test to include user message to be printed when
beConstantValueOf fails.

Bug:  719716 
Test: audit-failures.html
Change-Id: I617f1614013cb525a8d9386c4a3a83302300035a
Reviewed-on: https://chromium-review.googlesource.com/752004
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513647}
[modify] https://crrev.com/0478028f33620d1745f0d864b38064cf9674e53f/third_party/WebKit/LayoutTests/webaudio/resources/audit.js
[modify] https://crrev.com/0478028f33620d1745f0d864b38064cf9674e53f/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures-expected.txt
[modify] https://crrev.com/0478028f33620d1745f0d864b38064cf9674e53f/third_party/WebKit/LayoutTests/webaudio/unit-tests/audit-failures.html

Comment 4 by rtoy@chromium.org, Nov 8 2017

Status: Fixed (was: Started)

Sign in to add a comment