Should.beConstantValueOf should print out more info on failure. |
|||
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.
,
Nov 2 2017
,
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
,
Nov 8 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by rtoy@chromium.org
, May 8 2017