From 6f3a2607ecb7cc9951ecaf95b403e032c1a0b980 Mon Sep 17 00:00:00 2001 From: Mate Dabis Date: Fri, 18 Jan 2019 11:18:59 +0100 Subject: [PATCH] Increase test coverage: Array.prototype.toString Branch coverage: Before: 5/6 After: 6/6 JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu --- tests/jerry/array-prototype-tostring.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/jerry/array-prototype-tostring.js b/tests/jerry/array-prototype-tostring.js index 5fd8853cae..ac784c7a60 100644 --- a/tests/jerry/array-prototype-tostring.js +++ b/tests/jerry/array-prototype-tostring.js @@ -61,3 +61,12 @@ try { assert (e.message === "foo"); assert (e instanceof ReferenceError); } + +/* ES v5.1 15.4.4.2.1. + Checking behavior when the function's this_argument is undefined */ +try { + Array.prototype.toString.call(undefined); + assert(false); +} catch (e) { + assert(e instanceof TypeError); +}