2008-06-07 Cameron Zwarich <cwzwarich@uwaterloo.ca>
[WebKit-https.git] / LayoutTests / fast / js / resources / order-of-operations.js
index fdcef7f027840934b2f69833641902552d7035f0..bd8936e4020cc24f9e8523b0700878ff9da2d89f 100644 (file)
@@ -25,4 +25,22 @@ shouldBe('(function(){ leftRight = ""; left() & right(); return leftRight; })()'
 shouldBe('(function(){ leftRight = ""; left() | right(); return leftRight; })()', '"LeftRight"');
 shouldBe('(function(){ leftRight = ""; left() ^ right(); return leftRight; })()', '"LeftRight"');
 
+function testEvaluationOfArguments()
+{
+    function throwPass()
+    {
+        throw "PASS";
+    }
+    
+    var nonFunction = 42;
+    
+    try {
+        nonFunction(throwPass());
+    } catch (e) {
+        return e == "PASS";
+    }
+}
+
+shouldBeTrue("testEvaluationOfArguments()");
+
 var successfullyParsed = true;