diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/tests/non262/Array/sort-01.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/non262/Array/sort-01.js b/js/src/tests/non262/Array/sort-01.js new file mode 100644 index 0000000000..da90220aef --- /dev/null +++ b/js/src/tests/non262/Array/sort-01.js @@ -0,0 +1,23 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +//----------------------------------------------------------------------------- +var BUGNUMBER = 604971; +var summary = 'array.sort compare-function gets incorrect this'; + +print(BUGNUMBER + ": " + summary); + +/************** + * BEGIN TEST * + **************/ + +[1, 2, 3].sort(function() { "use strict"; assertEq(this, undefined); }); + +/******************************************************************************/ + +if (typeof reportCompare === "function") + reportCompare(true, true); + +print("All tests passed!"); |