From 4aeeaf29b0a96641a0b60ee431e6397fdf8251b6 Mon Sep 17 00:00:00 2001 From: Mate Dabis Date: Mon, 21 Jan 2019 13:39:05 +0100 Subject: [PATCH] Increase branch coverage: Array.prototype.join Branch coverage: Before: 19/20 After: 20/20 JerryScript-DCO-1.0-Signed-off-by: Mate Dabis mdabis@inf.u-szeged.hu --- tests/jerry/array-prototype-join.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/jerry/array-prototype-join.js b/tests/jerry/array-prototype-join.js index 96233d0e72..1257572873 100644 --- a/tests/jerry/array-prototype-join.js +++ b/tests/jerry/array-prototype-join.js @@ -74,3 +74,12 @@ obj_2[3] = 4; obj_2.join = Array.prototype.join; assert (obj_2.join() === "1,2,3"); + +/* ES v5.1 15.4.4.5.1. + Checking behavior when the function's this_argument is undefined */ +try { + Array.prototype.join.call(undefined); + assert(false); +} catch (e) { + assert(e instanceof TypeError); +}