// reverse
value = '123';
-expect = '123';
+expect = 'TypeError: Attempted to assign to readonly property.';
try
{
actual = Array.prototype.reverse.call(value) + '';
// sort
value = 'cba';
-expect = 'cba';
+expect = 'TypeError: Attempted to assign to readonly property.';
try
{
actual = Array.prototype.sort.call(value) + '';
// pop
value = 'abc';
-expect = 'c';
+expect = 'TypeError: Unable to delete property.';
try
{
actual = Array.prototype.pop.call(value);
// unshift
value = 'def';
-expect = 6;
+expect = "TypeError: Attempted to assign to readonly property.";
try
{
actual = Array.prototype.unshift.call(value, 'a', 'b', 'c');
// shift
value = 'abc';
-expect = 'a';
+expect = 'TypeError: Attempted to assign to readonly property.';
try
{
actual = Array.prototype.shift.call(value);
// splice
value = 'abc';
-expect = 'b';
+expect = 'TypeError: Attempted to assign to readonly property.';
try
{
actual = Array.prototype.splice.call(value, 1, 1) + '';