[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    khtmltests/js
From:       Peter Kelly <pmk () post ! com>
Date:       2003-03-29 11:13:25
[Download RAW message or body]

CVS commit by pmk: 

added some more js tests


  A            object_prototype.js   1.1
  M +36 -0     function_arguments.js   1.3
  M +0 -5      mozilla/patch.js   1.3


--- khtmltests/js/function_arguments.js  #1.2:1.3
@@ -54,2 +54,38 @@
 shouldBeTrue("DontDeleteOK");
 shouldBeTrue("DontEnumOK");
+
+// Check that parameter variables are bound to the corresponding
+// elements in the arguments array
+var arg0 = null;
+var arg1 = null;
+var arg2 = null;
+var newarg0 = null;
+var newarg1 = null;
+var newarg2 = null;
+var newx = null;
+var arglength = 0;
+
+function dupargs(x,x,x)
+{
+  arg0 = arguments[0];
+  arg1 = arguments[1];
+  arg2 = arguments[2];
+  arglength = arguments.length;
+  x = 999;
+  newarg0 = arguments[0];
+  newarg1 = arguments[1];
+  newarg2 = arguments[2];
+  arguments[2] = 888;
+  newx = x;
+}
+
+dupargs(1,2,3);
+
+shouldBe("arg0","1");
+shouldBe("arg1","2");
+shouldBe("arg2","3");
+shouldBe("arglength","3");
+shouldBe("newarg0","1");
+shouldBe("newarg1","2");
+shouldBe("newarg2","999");
+shouldBe("newx","888");

--- khtmltests/js/mozilla/patch.js  #1.2:1.3
@@ -20,9 +20,4 @@
 }
 
-
-function quit() {
-  // ###
-}
-
 function gc() {
   return true;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic