Changeset 95504 in webkit for trunk/Source/JavaScriptCore/tests


Ignore:
Timestamp:
Sep 19, 2011, 6:41:42 PM (14 years ago)
Author:
[email protected]
Message:

String#split is buggy
https://bugs.webkit.org/show_bug.cgi?id=68348

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/StringPrototype.cpp:

(JSC::jsStringWithReuse):

  • added helper function to reuse original JSString value.

(JSC::stringProtoFuncSplit):

  • Rewritten from the spec.
  • tests/mozilla/ecma/String/15.5.4.8-2.js:

(getTestCases):

  • This test is not ES5 compliant.

LayoutTests:

  • fast/js/script-tests/string-split-conformance.js: Added.
  • fast/js/string-split-conformance-expected.txt: Added.
  • fast/js/string-split-conformance.html: Added.
    • Added new Layout test based on:

http://stevenlevithan.com/demo/split.cfm

  • sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T6-expected.txt:
  • sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T7-expected.txt:
  • sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T8-expected.txt:
  • sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A1_T9-expected.txt:
  • sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.14_String.prototype.split/S15.5.4.14_A2_T7-expected.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/tests/mozilla/ecma/String/15.5.4.8-2.js

    r11995 r95504  
    108108    }
    109109
    110     // case where the value of the separator is undefined.  in this case. the value of the separator
    111     // should be ToString( separator ), or "undefined".
     110    // Case where the value of the separator is undefined.
     111    // Per ES5 15.5.4.14 step 10 this returns the input (unless limit is non-zero).
    112112
    113113    var TEST_STRING = "thisundefinedisundefinedaundefinedstringundefinedobject";
    114     var EXPECT_STRING = new Array( "this", "is", "a", "string", "object" );
     114    var EXPECT_STRING = new Array( "thisundefinedisundefinedaundefinedstringundefinedobject" );
    115115
    116116    array[item++] = new TestCase(   SECTION,
Note: See TracChangeset for help on using the changeset viewer.