• 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...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...