15 lines
354 B
JavaScript
15 lines
354 B
JavaScript
description(
|
|
"This test checks whether arguments crashes when passed a bad index."
|
|
);
|
|
|
|
function indexArguments(index)
|
|
{
|
|
return arguments[index];
|
|
}
|
|
|
|
shouldBe('indexArguments(1, "a")', '"a"');
|
|
shouldBe('indexArguments("1 ", "a")', 'undefined');
|
|
shouldBe('indexArguments(0xDEADBEEF)', 'undefined');
|
|
shouldBe('indexArguments(0xFFFFFFFF)', 'undefined');
|
|
|