Home | History | Annotate | Download | only in mjsunit

Lines Matching refs:function

33 function TestNumberSort() {
41 a.sort(function(x, y) { return x - y; });
78 function TestSmiLexicographicCompare() {
85 function add(x) {
94 function addSigned(x) {
129 function TestStringSort() {
140 function TestObjectSort() {
141 var obj0 = { toString: function() { return "a"; } };
142 var obj1 = { toString: function() { return "b"; } };
143 var obj2 = { toString: function() { return "c"; } };
152 function TestArraySortingWithHoles() {
165 function TestArraySortingWithUndefined() {
173 // Test that sorting using an unsound comparison function still gives a
176 function TestArraySortingWithUnsoundComparisonFunction() {
178 a.sort(function(x, y) { return 1; });
186 function TestSparseNonArraySorting(length) {
208 function TestArrayLongerLength(length) {
227 function TestNonArrayLongerLength(length) {
246 function TestNonArrayWithAccessors() {
252 x.__defineGetter__("1", function(){return this.foo;});
253 x.__defineSetter__("1", function(val){this.foo = val;});
270 function TestInheritedElementSort(depth) {
283 Array.prototype.sort.call(obj, function(a,b) { return (b < a) - (a < b); });
302 function TestSparseInheritedElementSort(scale) {
337 function TestSpecialCasesInheritedElementSort() {
393 // Test that sort calls compare function with global object as receiver,
395 function o(v) {
400 function cmpTest(a, b) {
408 function TestSortDoesNotDependOnObjectPrototypeHasOwnProperty() {
415 Object.defineProperty(arr, 0, { get: function() {}, set: function() {} });
422 function TestSortDoesNotDependOnArrayPrototypePush() {
426 Array.prototype.push = function() {
440 function TestSortDoesNotDependOnArrayPrototypeSort() {
444 Array.prototype.sort = function() {