• Camillo Bruni's avatar
    [mjsunit] Improve mjsunit stracktrace readability · f720d024
    Camillo Bruni authored
    Format the function name and file-position into proper columns to easily spot
    where the test code ends and the mjsunit framework code starts.
    
    BEFORE:
    Stack: Error
        at new MjsUnitAssertionError (test/mjsunit/mjsunit.js:36:18)
        at failWithMessage (test/mjsunit/mjsunit.js:310:11)
        at fail (test/mjsunit/mjsunit.js:327:12)
        at assertEquals (test/mjsunit/mjsunit.js:398:7)
        at closure (test/mjsunit/regress/regress-4121.js:20:7)
        at literals_sharing_test (test/mjsunit/regress/regress-4121.js:27:3)
        at test (test/mjsunit/regress/regress-4121.js:37:5)
        at eval (eval at <anonymous> (test/mjsunit/regress/regress-4121.js:49:6), <anonymous>:1:1)
        at test/mjsunit/regress/regress-4121.js:49:6
        at Array.forEach.call (test/mjsunit/regress/regress-4121.js:50:7)
        throw new MjsUnitAssertionError(message);
    
    AFTER:
    Stack: MjsUnitAssertionError
        at assertEquals          test/mjsunit/mjsunit.js 398:7
        at closure               test/mjsunit/regress/regress-4121.js 20:7
        at literals_sharing_test test/mjsunit/regress/regress-4121.js 27:3
        at test                  test/mjsunit/regress/regress-4121.js 37:5
        at eval                  eval at <anonymous> (test/mjsunit/regress/regress-4121.js:49:6)
        at                       test/mjsunit/regress/regress-4121.js 49:6
        at Array.forEach.call    test/mjsunit/regress/regress-4121.js 50:7
        throw new MjsUnitAssertionError(message);
    
    
    Change-Id: Iad3460a648e26effb43c00426ab043743ee6a138
    Reviewed-on: https://chromium-review.googlesource.com/563627Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Commit-Queue: Camillo Bruni <cbruni@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#46589}
    f720d024
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...