Commit Graph

41 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen 56505e0575 Stop using Match.group.
The `Match.operator[]` does the same thing and is
generally recommended (and shorter).
(I want to deprecate `group` and `groups`)

Tested: Refactoring.
CoreLibraryReviewExempt: Calling equivalent function.
Change-Id: I4c758968ae622fe16b7322be1b29b05b91e7fcd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/489021
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2026-03-20 09:09:46 -07:00
Ryan Macnak e443b89f23 [vm] Update Irregexp to V8 commit 254cc758346f10be2a7e22e55d90d4defe9cad74.
Includes support for modifier spans and duplicate named capture groups.

Drops the flow graph implementation to ease maintenance.

TEST=corelib/regexp
Bug: https://github.com/dart-lang/sdk/issues/56573
Bug: https://github.com/dart-lang/sdk/issues/61337
Bug: https://github.com/dart-lang/sdk/issues/62349
Bug: https://github.com/dart-lang/sdk/issues/62708
Change-Id: I05640ba945a4fa5476e7ad463738f4f39d842c14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480121
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2026-02-23 09:54:47 -08:00
Robert Nystrom e79a142cf2 Reformat tests/corelib with the 3.8 style.
There is another batch of style changes coming out in 3.8, so I'm going
through and reformatting the SDK again. (Well, I didn't finish the
reformat the first time, so not fully "again", I guess.)

Change-Id: I83d9809fc0da71010c0ef567c208981df68c351c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425201
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2025-04-29 05:48:52 -07:00
Robert Nystrom 0906af6d2f Reformat tests/corelib/.
I also regenerated the static error expectations (see #57042 for
context).

Change-Id: Ia0ca22604a0dd422cc265a46845afc43f551fe38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/394572
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2024-11-14 13:04:51 +00:00
Parker Lougheed c73677e606 [tests] Minor spelling and grammar fixes
Change-Id: I18c309b9037cf94a883443ac9067f911f829516c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388945
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-09 08:38:48 +00:00
Lasse R.H. Nielsen e260cc0330 Reset regexp lastIndex before using it again.
The way JS RegExps handle anchored matches is to have a separate RegExp
with `|()` added at the end, which means it either matches at that point,
or the `()` matches at that point, and that's visible in the captures
as a non-`null` last capture group.

The same RegExp is used to find the number of captures a RegExp has,
by running it on an empty string, and seeing the length of the capture
array, even if it contains nothing but `null` and `""` values.

The RegExp is as JS global regexp, which is what allows it to start matching
at a specific point, which we use for `startsWith(Pattern, start)`.
Every *normal* use of that RegExp remembers to set the `lastIndex` of the
regexp before using it, but the `regExpCaptureCount` used the "anchored
regexp" directly, and forgot to set the `lastIndex`, and since it had just
been used and failed to match at a position *later* than the current input
string's length, the "unfailable" test on the empty string failed, returning
`null` where no `null` was expected.

So now `regExpCaptureCount` sets `lastIndex` to zero before using the RegExp,
like every use of a shared RegExp should.

Fixes #56834

Bug: https://dartbug/com/56834
Change-Id: Ib649b70db5922c277950d7b7cfd4d157788d11cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/388002
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-10-03 14:01:41 +00:00
Lasse R.H. Nielsen b464fc9037 Reland "Tweak expect.dart library."
This reverts commit cd2c566bcf.

Reason for revert: Updating to not remove field used by Flutter engine.

Original change's description:
> Revert "Tweak `expect.dart` library."
>
> This reverts commit ff5f391c0a.
>
> Reason for revert: The expect library is used by Flutter engine, and some of its tests use assertStatementsEnabled. There should be a migration path that doesn't require an atomic change, like adding the replacement api before removing the old one.
>
> Original change's description:
> > Tweak `expect.dart` library.
> >
> > Make API more consistent for a few methods.
> > Reduce the number of language features used in tests:
> > * Never iterating an iterable, always converting it
> >   using `.toList()` first and iterating using indices
> >   (fx `setEquals`).
> >   Also require a `List` in places where an `Iterable`
> >   wasn't necessary.
> > * Avoid doing complicated computations that are also
> >   used for the error message. Do simple check first,
> >   then recompute to get better error messages
> >   (fx `allDistinct`).
> >
> > Renamed some rarely used members for consistency
> > (`stringContainsInOrder`->`containsInOrder`,
> > where other string-contains functions just start
> > with `contains`, and `containsOneOf` -> `containsAny`
> > to match `Iterable.any` phrasing, and also it accepts
> > if containing at least one, not precisely one.)
> >
> > Removed a function that wasn't used anywhere.
> >
> > Moved `assertStatementsEnabled` to `variations.dart` as `asserts`.
> > Removed `typeAssertionsEnabled` and `checkedModeEnabled`. The former used in one place, where it was replaced with `checkedImplicitDowncasts` from `variations.dart`, the latter wasn't used anywhere.
> >
> > Deprecates `package:expect/minitest.dart`. It was never intended
> > to be used for new tests, only as a help to convert existing tests
> > written against `package:unit_test`.
> > All existing imports marked as `// ignore: deprecated_member_use`.
> >
> > Change-Id: I07e21d4c0f3ccf11b82ee34af2668fdbb22264d2
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352360
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Reviewed-by: Ömer Ağacan <omersa@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
>
> Change-Id: I360b4347470a0bb2b63c3108e2b83ee2a771bf3f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362020
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Ömer Ağacan <omersa@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: William Hesse <whesse@google.com>

CoreLibraryReviewExempt: Reland
Change-Id: I53db40edc0733842a008839c3913d51c885e39ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362502
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-04-26 15:28:26 +00:00
William Hesse cd2c566bcf Revert "Tweak expect.dart library."
This reverts commit ff5f391c0a.

Reason for revert: The expect library is used by Flutter engine, and some of its tests use assertStatementsEnabled. There should be a migration path that doesn't require an atomic change, like adding the replacement api before removing the old one.

Original change's description:
> Tweak `expect.dart` library.
>
> Make API more consistent for a few methods.
> Reduce the number of language features used in tests:
> * Never iterating an iterable, always converting it
>   using `.toList()` first and iterating using indices
>   (fx `setEquals`).
>   Also require a `List` in places where an `Iterable`
>   wasn't necessary.
> * Avoid doing complicated computations that are also
>   used for the error message. Do simple check first,
>   then recompute to get better error messages
>   (fx `allDistinct`).
>
> Renamed some rarely used members for consistency
> (`stringContainsInOrder`->`containsInOrder`,
> where other string-contains functions just start
> with `contains`, and `containsOneOf` -> `containsAny`
> to match `Iterable.any` phrasing, and also it accepts
> if containing at least one, not precisely one.)
>
> Removed a function that wasn't used anywhere.
>
> Moved `assertStatementsEnabled` to `variations.dart` as `asserts`.
> Removed `typeAssertionsEnabled` and `checkedModeEnabled`. The former used in one place, where it was replaced with `checkedImplicitDowncasts` from `variations.dart`, the latter wasn't used anywhere.
>
> Deprecates `package:expect/minitest.dart`. It was never intended
> to be used for new tests, only as a help to convert existing tests
> written against `package:unit_test`.
> All existing imports marked as `// ignore: deprecated_member_use`.
>
> Change-Id: I07e21d4c0f3ccf11b82ee34af2668fdbb22264d2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352360
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Ömer Ağacan <omersa@google.com>
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

Change-Id: I360b4347470a0bb2b63c3108e2b83ee2a771bf3f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/362020
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: William Hesse <whesse@google.com>
2024-04-09 18:10:57 +00:00
Lasse R.H. Nielsen ff5f391c0a Tweak expect.dart library.
Make API more consistent for a few methods.
Reduce the number of language features used in tests:
* Never iterating an iterable, always converting it
  using `.toList()` first and iterating using indices
  (fx `setEquals`).
  Also require a `List` in places where an `Iterable`
  wasn't necessary.
* Avoid doing complicated computations that are also
  used for the error message. Do simple check first,
  then recompute to get better error messages
  (fx `allDistinct`).

Renamed some rarely used members for consistency
(`stringContainsInOrder`->`containsInOrder`,
where other string-contains functions just start
with `contains`, and `containsOneOf` -> `containsAny`
to match `Iterable.any` phrasing, and also it accepts
if containing at least one, not precisely one.)

Removed a function that wasn't used anywhere.

Moved `assertStatementsEnabled` to `variations.dart` as `asserts`.
Removed `typeAssertionsEnabled` and `checkedModeEnabled`. The former used in one place, where it was replaced with `checkedImplicitDowncasts` from `variations.dart`, the latter wasn't used anywhere.

Deprecates `package:expect/minitest.dart`. It was never intended
to be used for new tests, only as a help to convert existing tests
written against `package:unit_test`.
All existing imports marked as `// ignore: deprecated_member_use`.

Change-Id: I07e21d4c0f3ccf11b82ee34af2668fdbb22264d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352360
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-04-09 14:49:17 +00:00
Vyacheslav Egorov 48f29b15c7 [vm/aot] Make regexp/stack-overflow test pass
This test needs a larger backtracking stack then we provide
by default in AOT mode. Allow controlling stack size via
a command line flag regexp_backtrack_stack_size_kb.

Additionally cleanup types in the interpreter a bit: generated
code uses Int32List for both register and backtracking stack.
But the interpreter was using intptr_t for backtracking stack
and int32_t for registers. Align these types to use int32_t
everywhere and add a bit of sanity checking to ensure that
we don't try to use regexp engine with strings which are
too big to fit into int32_t range.

TEST=corelib/regexp/stack-overflow

Change-Id: I5c13c4b47d5d478b683f0450d3c0ce65f6961cff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338141
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-11-27 15:22:40 +00:00
Alexander Aprelev 4b7de54e03 [vm/regex] Pick a fix for unicode negated range RegExp.
Pick up v8 fix https://chromium-review.googlesource.com/c/v8/v8/+/3802690.

Fixes https://github.com/dart-lang/sdk/issues/52182
TEST=corelib/regexp/regexp_test

Change-Id: I01057ec5c8babdafc06ddeea3db48e14ae7c5357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298700
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2023-04-26 19:46:06 +00:00
Joshua Litt 2e0784a6c5 [test] Breakup named-captures_test to preserve test coverage.
Apparently the web implementation of RegExp has drifted from the native implementation in a very subtle way. To prevent further drift, this CL refactors named-captures_test into two tests, one which fails on all web backends currently(named_captures_2_test), and one that passes on all backends(named-captures_test, named unchanged to preserve history).

Change-Id: Ie94185948873fe3e592c10a45c6127dc6d0a4238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267282
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-11-16 16:19:34 +00:00
Lasse R.H. Nielsen 5642199dd0 Remove uses of : as default value separator in some tests/ directories.
Change-Id: I35bb926e53e92fd02e264fb5b14feadf063fb8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257961
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-07 14:49:17 +00:00
Robert Nystrom d9bb487ca8 Treat the expect and async_helper packages as opted in to NNBD.
This should enable strong mode tests to be fully NNBD opted in. At the
same time, legacy tests when run with the experiment off should
hopefully be able to still consume these libraries because they don't
actually use any NNBD features.

To do this, I changed the script that generates the SDK repo's package
config to not put in a language version for any package whose pubspec
has no SDK version. According to language versioning, that means the
package should be considered to be at the "current" version of the SDK
running the code.

In NNBD, that's opted in. With the experiment off, that is (presumably)
"opted out" in the sense that NNBD doesn't exist.

In order to *not* opt in some of the other packages that currently
lack SDK constraints, I put those in and pinned them to "^2.7.0" which
was what the package config script used to implicitly fill in for them.

I see a bunch of other changes in the generated package config too. The
update script probably hasn't been run in a while.

Change-Id: I55193d42eac0696a6b0105546551efa45a1f3252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144305
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-04-27 21:04:56 +00:00
Johnni Winther 2d12821cba [test] Fix various static errors in corelib tests
Change-Id: I762538437b8f68f20c149b737cbe65f212c5c3b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142370
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-04-16 09:20:21 +00:00
Mark Zhou 649b29ae46 [tests] Fixing migrated corelib/regexp tests.
Change-Id: I5e466358cf8432750c4900f012d199b3309621d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140762
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-24 16:45:25 +00:00
Lasse Reichstein Holst Nielsen 9e10ef4458 Fix null-read in RegExpMatch.groupNames.
Fixes VM, DDC and Dart2js.

BUG= http://dartbug.com/39406

Change-Id: If181eaf50905c571614b656a232564e394e1b35d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136635
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-11 14:21:39 +00:00
Mark Zhou e7a524e8c4 Cleaning up corelib test migrations.
Change-Id: Ib235c213861f819ed11a887283cad085582eaac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132941
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-02-03 19:06:17 +00:00
Robert Nystrom 4eda30c5c2 Migrate corelib_2/regexp files to NNBD.
Change-Id: I5bacd28d806661b9190d4b097955263a56f19a4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128110
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2019-12-18 16:16:51 +00:00
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Bob Nystrom edee53f93d Bring back the deleted 1.0 corelib tests.
What is dead may never die.

Change-Id: I80ef766b8ce2b6e1416df8e1f9b91fb74169dc79
Reviewed-on: https://dart-review.googlesource.com/7483
Reviewed-by: William Hesse <whesse@google.com>
2017-09-21 18:29:40 +00:00
Janice Collins 51cc9689b3 Remove corelib and corelib_strong and migrate last two remaining tests.
This includes a migration of linked_hash_map_from_iterable_test and
stacktrace_current_test, which were migrated without changes.

BUG=
R=rnystrom@google.com, whesse@google.com

Review-Url: https://codereview.chromium.org/3004073002 .
2017-09-01 08:11:15 -07:00
Ben Konyi 4d6f6a8bbd Migrated test block 19 to Dart 2.0.
Added 'toString()' to lines 63 and 99 of regexp/global_test.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2989863002 .
2017-08-01 12:24:23 -07:00
Ben Konyi 011c9b0f75 Migrated test block 19 to Dart 2.0.
BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2985233002 .
2017-07-31 09:49:08 -07:00
Ben Konyi 4f33acda8a Migrated test block 21 to Dart 2.0.
No changes made to tests.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2989843002 .
2017-07-28 13:10:40 -07:00
Ben Konyi 814edbe896 Migrated test block 20 to Dart 2.0.
No changes to tests, just the following status file updates:

Entries for status file /usr/local/google/home/bkonyi/sdk/tests/corelib/corelib.status:
[ (($compiler == dart2js) && (bool $dart2js_with_kernel)) ]
regexp/invalid-range-in-class_test: Crash
regexp/issue_19193_test: Crash
regexp/lastindex_test: Crash
regexp/lookahead_test: Crash
regexp/multiline_test: Crash
regexp/negative-special-characters_test: Crash
regexp/no-extensions_test: Crash
regexp/non-capturing-groups_test: Crash

[ ((($compiler == dart2js) && (bool $dart2js_with_kernel)) && (bool $minified)) ]
regexp/bol-with-multiline_test: Crash
regexp/look-ahead_test: Crash
regexp/loop-capture_test: Crash
regexp/malformed-escapes_test: Crash
regexp/many-brackets_test: Crash
regexp/non-bmp_test: Crash
regexp/non-capturing-backtracking_test: Crash
regexp/non-character_test: Crash
regexp/non-greedy-parentheses_test: Crash

Entries for status file /usr/local/google/home/bkonyi/sdk/tests/corelib_strong/corelib_strong.status:
[ ($compiler == dartdevc) ]
regexp/bol-with-multiline_test: RuntimeError # Issue 29921
regexp/invalid-range-in-class_test: RuntimeError # Issue 29921
regexp/look-ahead_test: RuntimeError # Issue 29921
regexp/loop-capture_test: RuntimeError # Issue 29921
regexp/malformed-escapes_test: RuntimeError # Issue 29921
regexp/many-brackets_test: RuntimeError # Issue 29921
regexp/negative-special-characters_test: RuntimeError # Issue 29921
regexp/no-extensions_test: RuntimeError # Issue 29921
regexp/non-bmp_test: RuntimeError # Issue 29921
regexp/non-capturing-backtracking_test: RuntimeError # Issue 29921
regexp/non-capturing-groups_test: RuntimeError # Issue 29921
regexp/non-character_test: RuntimeError # Issue 29921
regexp/non-greedy-parentheses_test: RuntimeError # Issue 29921

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2989003002 .
2017-07-28 12:52:08 -07:00
Ben Konyi 26c8479729 Migrated test block 22 to Dart 2.0
No updates made to tests.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2989723002 .
2017-07-28 11:28:08 -07:00
Ben Konyi 4479a89467 Migrated test block 23 to Dart 2.0.
No major changes. Updated regexp_test.dart to not use the same variable
for Strings and Regexps.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2990603003 .
2017-07-27 12:10:01 -07:00
Ben Konyi 5d2881ce09 Readded files that were accidentally removed.
TBR=jcollins@google.com
BUG=

Review-Url: https://codereview.chromium.org/2990683003 .
2017-07-25 15:43:09 -07:00
Ben Konyi 64785f0614 Migrated test block 24 to Dart 2.0.
Another fairly simple block. regress-standalone required the
introduction of two seperate result variables as result was having two
different types assigned to it at different times.

BUG=
R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2985823002 .
2017-07-25 15:22:33 -07:00
Erik Corry 029b1cb948 Spelling fixes e to i.
R=kevmoo@google.com
BUG=

Review-Url: https://codereview.chromium.org/2957593002 .
2017-06-24 13:41:39 +02:00
Erik Corry aa6353b6da Dart SDK Spelling b, c, and d.
R=kmillikin@google.com
BUG=

Review-Url: https://codereview.chromium.org/2850783002 .
2017-05-01 08:28:10 +02:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
Jacob Richman 6a7d6c385e Add comments
Add spaces to make sure dartfmt doesn't destroy bespoke indentation

BUG=
R=sra@google.com

Review-Url: https://codereview.chromium.org/2763823002 .
2017-03-20 21:03:12 -07:00
Vyacheslav Egorov 2403444eba VM: Optimize RegExp.matchAsPrefix(...) by generating a sticky RegExp specialization.
This is the same as a sticky RegExp flag in ES2015.

Overlay some RegExp fields on top of each other - given that they should never be used simultaneously.

BUG=http://dartbug.com/27810
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2510783002 .
2016-11-17 17:46:21 +01:00
Johnni Winther 783ed933ff Fix boolean conversion bug in dart2js + update JSRegExp accordingly.
BUG=
R=herhut@google.com

Review URL: https://codereview.chromium.org//1259473005.
2015-07-27 14:19:26 +02:00
zerny@google.com 52cf25b213 Regression test for issue 19193.
Issue resolved by r42312.

R=lrn@google.com
BUG=http://dartbug.com/19193

Review URL: https://codereview.chromium.org//890533002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43276 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 12:14:08 +00:00
zerny@google.com f579383d56 Reapply "Port regexp tests from V8 to Dart."
This fixes checked mode issues and reapplies commit
https://code.google.com/p/dart/source/detail?r=41354

R=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//691473002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41416 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-30 11:34:18 +00:00
zerny@google.com 488b0e1630 Revert "Port regexp tests from V8 to Dart."
Reason: The tests do not run cleanly in checked mode.

TBR=lrn@google.com
BUG=

Review URL: https://codereview.chromium.org//687613002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41358 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 13:33:15 +00:00
zerny@google.com 19a7c86e6b Rename RegExp_test.dart to regexp_kde_test.dart to avoid conflict with regexp_test.dart on Windows.
TBR=ricow@google.com
BUG=

Review URL: https://codereview.chromium.org//683833002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41356 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 13:00:54 +00:00
zerny@google.com f68daab3f9 Port regexp tests from V8 to Dart.
This adds V8s suite of regular expressions tests. The tests are skipped
for all none d8 runtimes until irregexp has been ported and enabled for
the other runtimes. The tests are enabled when compiling with dart2js
and running with d8.

BUG=http://dartbug.com/21396
R=lrn@google.com

Review URL: https://codereview.chromium.org//667043003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41354 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 12:33:15 +00:00