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

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

Issue 146983007: Fix inconsistencies wrt whitespaces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | test/mjsunit/third_party/string-trim.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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 return ('0' <= c && c <= '9'); 438 return ('0' <= c && c <= '9');
439 } 439 }
440 440
441 441
442 static bool NotDigit(uc16 c) { 442 static bool NotDigit(uc16 c) {
443 return !IsDigit(c); 443 return !IsDigit(c);
444 } 444 }
445 445
446 446
447 static bool IsWhiteSpace(uc16 c) { 447 static bool IsWhiteSpace(uc16 c) {
448 switch (c) { 448 return v8::internal::WhiteSpace::Is(c);
449 case 0x09:
450 case 0x0A:
451 case 0x0B:
452 case 0x0C:
453 case 0x0d:
454 case 0x20:
455 case 0xA0:
456 case 0x2028:
457 case 0x2029:
458 case 0xFEFF:
459 return true;
460 default:
461 return unibrow::Space::Is(c);
462 }
463 } 449 }
464 450
465 451
466 static bool NotWhiteSpace(uc16 c) { 452 static bool NotWhiteSpace(uc16 c) {
467 return !IsWhiteSpace(c); 453 return !IsWhiteSpace(c);
468 } 454 }
469 455
470 456
471 static bool NotWord(uc16 c) { 457 static bool NotWord(uc16 c) {
472 return !IsRegExpWord(c); 458 return !IsRegExpWord(c);
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1808 ZoneList<CharacterRange> first_only(4, &zone); 1794 ZoneList<CharacterRange> first_only(4, &zone);
1809 ZoneList<CharacterRange> second_only(4, &zone); 1795 ZoneList<CharacterRange> second_only(4, &zone);
1810 ZoneList<CharacterRange> both(4, &zone); 1796 ZoneList<CharacterRange> both(4, &zone);
1811 } 1797 }
1812 1798
1813 1799
1814 TEST(Graph) { 1800 TEST(Graph) {
1815 V8::Initialize(NULL); 1801 V8::Initialize(NULL);
1816 Execute("\\b\\w+\\b", false, true, true); 1802 Execute("\\b\\w+\\b", false, true, true);
1817 } 1803 }
OLDNEW
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | test/mjsunit/third_party/string-trim.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698