Skip to content

Commit 4aeeaf2

Browse files
committed
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
1 parent 2365b4e commit 4aeeaf2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/jerry/array-prototype-join.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,12 @@ obj_2[3] = 4;
7474
obj_2.join = Array.prototype.join;
7575

7676
assert (obj_2.join() === "1,2,3");
77+
78+
/* ES v5.1 15.4.4.5.1.
79+
Checking behavior when the function's this_argument is undefined */
80+
try {
81+
Array.prototype.join.call(undefined);
82+
assert(false);
83+
} catch (e) {
84+
assert(e instanceof TypeError);
85+
}

0 commit comments

Comments
 (0)