Commit graph

31 commits

Author SHA1 Message Date
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