michael@0: function AddTestCase( description, expect, actual ) { michael@0: new TestCase( SECTION, description, expect, actual ); michael@0: } michael@0: function TestCase(n, d, e, a) {} michael@0: var SECTION = "String/match-004.js"; michael@0: re = /0./; michael@0: s = 10203040506070809000; michael@0: Number.prototype.match = String.prototype.match; michael@0: AddRegExpCases( re, "re = " + re , s, String(s), 1, ["02"]); michael@0: AddRegExpCases( re, re, s, ["02"]); michael@0: function AddRegExpCases( michael@0: regexp, str_regexp, string, str_string, index, matches_array ) { michael@0: if ( regexp.exec(string) == null || matches_array == null ) { michael@0: AddTestCase( string.match(regexp) ); michael@0: } michael@0: AddTestCase( string.match(regexp).input ); michael@0: gczeal(4); michael@0: } michael@0: