Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: test/cctest/test-strings.cc

Issue 2006263003: Version 5.0.71.53 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/js/string.js ('k') | test/mjsunit/regress/regress-seqstrsetchar-ex2.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 Handle<String> arg0 = isolate->factory()->NewStringFromAsciiChecked("arg0"); 1501 Handle<String> arg0 = isolate->factory()->NewStringFromAsciiChecked("arg0");
1502 Handle<String> arg1 = isolate->factory()->NewStringFromAsciiChecked("arg1"); 1502 Handle<String> arg1 = isolate->factory()->NewStringFromAsciiChecked("arg1");
1503 Handle<String> arg2 = isolate->factory()->NewStringFromAsciiChecked("arg2"); 1503 Handle<String> arg2 = isolate->factory()->NewStringFromAsciiChecked("arg2");
1504 Handle<String> result = 1504 Handle<String> result =
1505 MessageTemplate::FormatMessage(MessageTemplate::kPropertyNotFunction, 1505 MessageTemplate::FormatMessage(MessageTemplate::kPropertyNotFunction,
1506 arg0, arg1, arg2).ToHandleChecked(); 1506 arg0, arg1, arg2).ToHandleChecked();
1507 Handle<String> expected = isolate->factory()->NewStringFromAsciiChecked( 1507 Handle<String> expected = isolate->factory()->NewStringFromAsciiChecked(
1508 "'arg0' returned for property 'arg1' of object 'arg2' is not a function"); 1508 "'arg0' returned for property 'arg1' of object 'arg2' is not a function");
1509 CHECK(String::Equals(result, expected)); 1509 CHECK(String::Equals(result, expected));
1510 } 1510 }
1511
1512 TEST(Regress609831) {
1513 CcTest::InitializeVM();
1514 LocalContext context;
1515 Isolate* isolate = CcTest::i_isolate();
1516 {
1517 HandleScope scope(isolate);
1518 v8::Local<v8::Value> result = CompileRun(
1519 "String.fromCharCode(32, 32, 32, 32, 32, "
1520 "32, 32, 32, 32, 32, 32, 32, 32, 32, 32, "
1521 "32, 32, 32, 32, 32, 32, 32, 32, 32, 32)");
1522 CHECK(v8::Utils::OpenHandle(*result)->IsSeqOneByteString());
1523 }
1524 {
1525 HandleScope scope(isolate);
1526 v8::Local<v8::Value> result = CompileRun(
1527 "String.fromCharCode(432, 432, 432, 432, 432, "
1528 "432, 432, 432, 432, 432, 432, 432, 432, 432, "
1529 "432, 432, 432, 432, 432, 432, 432, 432, 432)");
1530 CHECK(v8::Utils::OpenHandle(*result)->IsSeqTwoByteString());
1531 }
1532 }
OLDNEW
« no previous file with comments | « src/js/string.js ('k') | test/mjsunit/regress/regress-seqstrsetchar-ex2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698