()
| 67 | // Test object sorting. Calls toString on each element and sorts |
| 68 | // lexicographically. |
| 69 | function 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 | |
| 78 | TestObjectSort(); |
| 79 |
no test coverage detected
searching dependent graphs…