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

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

Issue 10831: Regexp bugfixes (Closed)
Patch Set: Created 12 years, 1 month 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/jsregexp.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (dot_output) { 342 if (dot_output) {
343 RegExpEngine::DotPrint(input, node); 343 RegExpEngine::DotPrint(input, node);
344 exit(0); 344 exit(0);
345 } 345 }
346 #endif // DEBUG 346 #endif // DEBUG
347 } 347 }
348 348
349 349
350 TEST(Execution) { 350 TEST(Execution) {
351 V8::Initialize(NULL); 351 V8::Initialize(NULL);
352 // Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbegh"); 352 Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbegh");
353 // Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbefh"); 353 Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbefh");
354 // Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbefd"); 354 Execute(".*?(?:a[bc]d|e[fg]h)", "xxxabbefd");
355 } 355 }
356 356
357 357
358 class TestConfig { 358 class TestConfig {
359 public: 359 public:
360 typedef int Key; 360 typedef int Key;
361 typedef int Value; 361 typedef int Value;
362 static const int kNoKey; 362 static const int kNoKey;
363 static const int kNoValue; 363 static const int kNoValue;
364 static inline int Compare(int a, int b) { 364 static inline int Compare(int a, int b) {
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 int to = PseudoRandom(i + 87, 25) % (kLimit / 20); 619 int to = PseudoRandom(i + 87, 25) % (kLimit / 20);
620 if (to > kLimit) to = kLimit; 620 if (to > kLimit) to = kLimit;
621 range->Add(CharacterRange(from, to)); 621 range->Add(CharacterRange(from, to));
622 } 622 }
623 DispatchTable table; 623 DispatchTable table;
624 // CharacterClassNode::AddInverseToTable(range, &table, 0); 624 // CharacterClassNode::AddInverseToTable(range, &table, 0);
625 } 625 }
626 626
627 627
628 TEST(Graph) { 628 TEST(Graph) {
629 Execute("([^a]|\\w)", "", true); 629 Execute(".*?a", "", true);
630 } 630 }
OLDNEW
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698