| Index: test/mjsunit/regress/string-split-monkey-patching.js
|
| diff --git a/test/cctest/test-platform.cc b/test/mjsunit/regress/string-split-monkey-patching.js
|
| similarity index 86%
|
| copy from test/cctest/test-platform.cc
|
| copy to test/mjsunit/regress/string-split-monkey-patching.js
|
| index 6c20b853c5e7408b1877ee74617c01c3fc32ed5f..fe1b040fbfd8f823108014c59c5177a5bbb926e6 100644
|
| --- a/test/cctest/test-platform.cc
|
| +++ b/test/mjsunit/regress/string-split-monkey-patching.js
|
| @@ -25,13 +25,11 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -#include <stdlib.h>
|
| +// Test that String.prototype.split with an regexp does not call the
|
| +// monkey-patchable Array.prototy.push.
|
|
|
| -#include "cctest.h"
|
| -#include "platform.h"
|
| -
|
| -using namespace ::v8::internal;
|
| -
|
| -TEST(NumberOfCores) {
|
| - CHECK_GT(OS::NumberOfCores(), 0);
|
| -}
|
| +Array.prototype.push = assertUnreachable;
|
| +"-".split(/-/);
|
| +"I-must-not-use-push!".split(/-/);
|
| +"Oh-no!".split(/(-)/);
|
| +"a".split(/(a)|(b)/);
|
|
|