MCPcopy Index your code
hub / github.com/nodejs/node / TestObjectSort

Function TestObjectSort

deps/v8/test/mjsunit/array-sort.js:69–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

67// Test object sorting. Calls toString on each element and sorts
68// lexicographically.
69function TestObjectSort() {
70 var obj0 = { toString: function() { return "a"; } };
71 var obj1 = { toString: function() { return "b"; } };
72 var obj2 = { toString: function() { return "c"; } };
73 var a = [ obj2, obj0, obj1 ];
74 a.sort();
75 assertArrayEquals([ obj0, obj1, obj2 ], a);
76}
77
78TestObjectSort();
79

Callers 1

array-sort.jsFile · 0.85

Calls 2

assertArrayEqualsFunction · 0.85
sortMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…