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

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

Issue 1661483002: Revert of [regexp] implement /ui to mirror the implementation for /i. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add cause of revert as test case Created 4 years, 10 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/unicode.h ('k') | test/mjsunit/harmony/unicode-regexp-ignore-case.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 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 1375
1376 TEST(IsAscii) { 1376 TEST(IsAscii) {
1377 CHECK(String::IsAscii(static_cast<char*>(NULL), 0)); 1377 CHECK(String::IsAscii(static_cast<char*>(NULL), 0));
1378 CHECK(String::IsOneByte(static_cast<uc16*>(NULL), 0)); 1378 CHECK(String::IsOneByte(static_cast<uc16*>(NULL), 0));
1379 } 1379 }
1380 1380
1381 1381
1382 1382
1383 template<typename Op, bool return_first> 1383 template<typename Op, bool return_first>
1384 static uint16_t ConvertLatin1(uint16_t c) { 1384 static uint16_t ConvertLatin1(uint16_t c) {
1385 uc32 result[Op::kMaxWidth]; 1385 uint32_t result[Op::kMaxWidth];
1386 int chars; 1386 int chars;
1387 chars = Op::Convert(c, 0, result, NULL); 1387 chars = Op::Convert(c, 0, result, NULL);
1388 if (chars == 0) return 0; 1388 if (chars == 0) return 0;
1389 CHECK_LE(chars, static_cast<int>(sizeof(result))); 1389 CHECK_LE(chars, static_cast<int>(sizeof(result)));
1390 if (!return_first && chars > 1) { 1390 if (!return_first && chars > 1) {
1391 return 0; 1391 return 0;
1392 } 1392 }
1393 return result[0]; 1393 return result[0];
1394 } 1394 }
1395 1395
(...skipping 105 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 }
OLDNEW
« no previous file with comments | « src/unicode.h ('k') | test/mjsunit/harmony/unicode-regexp-ignore-case.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698