Ignore:
Timestamp:
Mar 14, 2006, 5:09:15 PM (19 years ago)
Author:
ggaren
Message:

JavaScriptCore:

  • Fixed <rdar://problem/4478239> string sort puts "closed" before "close"

Reviewed by Eric.

  • kjs/ustring.cpp: (KJS::compare): Inverted a < in order to treat the longer string as > the shorter string.

LayoutTests:

Reviewed by Eric.

Layout test for <rdar://problem/4478239> string sort puts "closed"
before "close"

Also changed the engine to report data types when tests fail, so that
you don't get messages like, "should be A, was A."

Updated results for these files:

  • fast/js/kde/Array-expected.txt:
  • fast/js/kde/RegExp-expected.txt:
  • fast/js/kde/encode_decode_uri-expected.txt:
  • fast/js/resources/js-test-pre.js:

Added these files:

  • fast/js/string-sort-expected.txt: Added.
  • fast/js/string-sort.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/ustring.cpp

    r13089 r13294  
    11771177    l++;
    11781178  }
     1179
    11791180  if (l < lmin)
    11801181    return (c1->uc > c2->uc) ? 1 : -1;
    11811182
    1182   if (l1 == l2) {
     1183  if (l1 == l2)
    11831184    return 0;
    1184   }
    1185   return (l1 < l2) ? 1 : -1;
     1185
     1186  return (l1 > l2) ? 1 : -1;
    11861187}
    11871188
Note: See TracChangeset for help on using the changeset viewer.