diff options
Diffstat (limited to 'js/src/tests/ecma_5/Array/sort-01.js')
-rw-r--r-- | js/src/tests/ecma_5/Array/sort-01.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/tests/ecma_5/Array/sort-01.js b/js/src/tests/ecma_5/Array/sort-01.js new file mode 100644 index 000000000..da90220ae --- /dev/null +++ b/js/src/tests/ecma_5/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!"); |