| Index: test/webkit/fast/js/modify-non-references.js
|
| diff --git a/test/webkit/for-in-exeception.js b/test/webkit/fast/js/modify-non-references.js
|
| similarity index 58%
|
| copy from test/webkit/for-in-exeception.js
|
| copy to test/webkit/fast/js/modify-non-references.js
|
| index f5101858daf1ae9f7cbcb660963ee7902982e28c..e8b9682e70685811ec36af7a783a9c041b30039f 100644
|
| --- a/test/webkit/for-in-exeception.js
|
| +++ b/test/webkit/fast/js/modify-non-references.js
|
| @@ -21,26 +21,15 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -description('Test for (foo in somethingWhichThrows) to catch ASSERT');
|
| -
|
| -function throwNullException() {
|
| - throw null;
|
| -}
|
| -
|
| -function throwUndefinedException() {
|
| - throw undefined;
|
| -}
|
| -
|
| -function throwStringException() {
|
| - throw "PASSED"
|
| -}
|
| -
|
| -function test(func) {
|
| - for (var foo in func()) {
|
| - testFailed("Shoud not be reached");
|
| - }
|
| -}
|
| -
|
| -shouldBeUndefined("test(throwUndefinedException)");
|
| -shouldBeUndefined("test(throwNullException)");
|
| -shouldThrow("test(throwStringException)");
|
| +shouldBe("function f() { g()++; } f.toString()", "'function f() { g()++; }'");
|
| +shouldBe("function f() { g()--; } f.toString()", "'function f() { g()--; }'");
|
| +shouldBe("function f() { ++g(); } f.toString()", "'function f() { ++g(); }'");
|
| +shouldBe("function f() { --g(); } f.toString()", "'function f() { --g(); }'");
|
| +shouldBe("function f() { g() = 1; } f.toString()", "'function f() { g() = 1; }'");
|
| +shouldBe("function f() { g() += 1; } f.toString()", "'function f() { g() += 1; }'");
|
| +shouldThrow("g()++", "'ReferenceError: Postfix ++ operator applied to value that is not a reference.'");
|
| +shouldThrow("g()--", "'ReferenceError: Postfix -- operator applied to value that is not a reference.'");
|
| +shouldThrow("++g()", "'ReferenceError: Prefix ++ operator applied to value that is not a reference.'");
|
| +shouldThrow("--g()", "'ReferenceError: Prefix -- operator applied to value that is not a reference.'");
|
| +shouldThrow("g() = 1", "'ReferenceError: Left side of assignment is not a reference.'");
|
| +shouldThrow("g() += 1", "'ReferenceError: Left side of assignment is not a reference.'");
|
|
|