Robert Nystrom
e314030e1f
Fix list tests to not set length on non-nullable lists.
...
The fixes to list_concurrent_modify_test are I think correct and
preserve the intent of the test. The changes to list_test get the test
working correctly and preserve the intent of the test but are
workarounds that shouldn't be needed once #42496 is fixed.
Change-Id: I82b32b2256b9940ceb934fb0f628311b8e7c6567
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152988
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
Auto-Submit: Bob Nystrom <rnystrom@google.com >
2020-07-15 00:45:43 +00:00
Konstantin Shcheglov
20917915bb
Update corelib/list_test for default exception type change.
...
R=brianwilkerson@google.com
Change-Id: I2bb89d5c422872ba5008c6375b8f27b02b9a95c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146683
Commit-Queue: Konstantin Shcheglov <scheglov@google.com >
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com >
2020-05-05 22:25:27 +00:00
Liam Appelbe
d78c783d75
[nnbd] Fix corelib/list_test in strong mode
...
Change-Id: I5dff3bdd62adde0ea78b93e8bf1b747082d6cd8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143963
Commit-Queue: Liam Appelbe <liama@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Reviewed-by: Régis Crelier <regis@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2020-04-21 21:13:58 +00:00
Johnni Winther
29ac98ea46
[test] Remove use of List constructor in corelib tests
...
Change-Id: I00777f1db859d075f7dfda21a72e7982d155747e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142371
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2020-04-17 08:45:46 +00:00
Robert Nystrom
02a8b015ad
Migrate corelib tests starting with "j" to "q" to NNBD.
...
Change-Id: I1783f624c7ce7d3b962c301c27ac0f4422d7c28f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126824
Commit-Queue: Bob Nystrom <rnystrom@google.com >
Auto-Submit: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2019-12-10 01:17:24 +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
Ben Konyi
ce197702e4
Migrated test block 15 to Dart 2.0.
...
list_unmodifiable_test required some modifications so callbacks matched
the correct types. list_unmodifiable_test and list_test also needed to
be disabled on dartdevc due to some issue with List<int> not mapping to
JSArray.
BUG=
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2992833002 .
2017-08-03 11:12:26 -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
Jacob Richman
14531fa62d
Re-land "Format all multitests"
...
Only delta from the original is a bad merge of tests/corelib/list_test.dart
This reverts commit 44d8be0ed3 .
BUG=
Review-Url: https://codereview.chromium.org/2774783002 .
2017-03-23 12:40:21 -07:00
Jacob Richman
44d8be0ed3
Revert "Format all multitests"
...
This reverts commit 312b66dd5f .
BUG=
Review-Url: https://codereview.chromium.org/2770063002 .
2017-03-23 10:49:40 -07:00
Jacob Richman
312b66dd5f
Format all multitests
...
BUG=
R=rnystrom@google.com
Review-Url: https://codereview.chromium.org/2768073002 .
2017-03-23 10:26:44 -07:00
Jacob Richman
88eb557b65
Fix warnings_checker.dart handling of multitests
...
Update all tests
Support //# multitests for better dartfmt compatibility and fewer multitest false positives
All files under tests were manually updated with
find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'
For now both old and new styles are allowed to accommodate CO19 tests.
R=efortuna@google.com
BUG=
Review-Url: https://codereview.chromium.org/2765693002 .
Review-Url: https://codereview.chromium.org/2765893003 .
2017-03-21 17:29:56 -07:00
Jacob Richman
bf2b545150
Revert "Update all tests"
...
This reverts commit ce76e9c30beaf9a193d3677b88c20a1ebb3fae8c.
2017-03-21 16:33:18 -07:00
Jacob Richman
3c7353d987
Update all tests
...
Support //# multitests for better dartfmt compatibility and fewer multitest false positives
All files under tests were manually updated with
find . -iregex '.*\.dart$' -print0 | xargs -0 perl -pi -e 's/(\S\s+)\/\/\/ /$1\/\/# /'
For now both old and new styles are allowed to accommodate CO19 tests.
R=efortuna@google.com
Review-Url: https://codereview.chromium.org/2765693002 .
2017-03-21 12:39:28 -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
Lasse R.H. Nielsen
50aa43569d
Add "growable" parameter to List.filled constructor.
...
Fixes issue #24884
BUG= http://dartbug.com/24884
R=floitsch@google.com
Review URL: https://codereview.chromium.org/1440663003 .
2015-11-13 09:30:46 +01:00
Lasse R.H. Nielsen
d755dd65b9
Update range errors to agree on the numbers.
...
Also ensure that typed-data errors are consistent with other lists.
Fixes issue #24295
BUG= http://dartbug.com/24295
R=floitsch@google.com , iposva@google.com , sra@google.com
Review URL: https://codereview.chromium.org//1318943005 .
2015-09-11 13:05:36 +02:00
sra@google.com
39dfecbfb5
Revert "Change ListIterator to only check for concurrent modification at each iteration"
...
Revert "Fix ListIterator.iterator function hash for VM."
This is not as easy to optimize for dart2js as initially thought.
Revert this change while we discuss.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//1064053007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45216 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 18:53:39 +00:00
lrn@google.com
5a79c03e09
Change ListIterator to only check for concurrent modification at each iteration
...
in checked mode.
It also checks at the end in all cases.
Iteration only goes from 0 to the original length of the list.
This ensures that iterating a list while adding to it (like by x.addAll(x))
is caught instead of growing until out-of-memory.
For well-behaved programs this makes no difference since length and original
length stay the same.
Also, it means that calling moveNext again later, after increasing the length,
will not make iteration continue. After returning false, iteration is always
done.
However, it means that reducing the length causes an out-of-range read before
reaching the end, and before a concurrent modification error can happen.
R=sra@google.com
Review URL: https://codereview.chromium.org//1024843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45198 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-16 09:07:58 +00:00
lrn@google.com
1ec6c5c1db
Revert "Add "last" setter to List."
...
After discussion, we decided not to change the List interface for something that is just a convenience.
Also revert "Mark pkgbuild/pkg/collection as failing when using repository packages"
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//331833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37307 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-13 09:40:22 +00:00
lrn@google.com
f528beb9f2
Add "last" setter to List.
...
This allows assigning directly as `list.last = value` instead of
having to use the longer `list[list.length - 1] = value`.
It's just an abbreviation, like `list.last` is for reading.
If you use a List as a stack (which is a perfectly good use of it),
modifying the last element like this is a natural operation.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//315173005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37255 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-12 08:11:22 +00:00
ngeoffray@google.com
f02627fe15
Update status file for safari bug.
...
R=kasperl@google.com
Review URL: https://codereview.chromium.org//85573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30616 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-25 11:22:39 +00:00
lrn@google.com
0354366832
Mark corelib/list_test/01 as failing on dart2js.
...
See issue 14616. This behavior is now checked for by a test.
Review URL: https://codereview.chromium.org//51223004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29530 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 11:26:46 +00:00
lrn@google.com
441688711f
Update List constructor documentation. Say that null is not a length.
...
R=floitsch@google.com , ngeoffray@google.com
Review URL: https://codereview.chromium.org//50733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29522 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 09:54:45 +00:00
zra@google.com
fa2ad38a31
Enables per-function far-branches for ARM and MIPS.
...
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//21363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25723 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 20:51:46 +00:00
zra@google.com
dad3270d95
Implements far branch targets for MIPS.
...
This change adds a flag --mips-far-branches, which when set causes
relative branches to be converted to absolute branches by determining
the PC, adding the branch offset to it, and using the jr or jalr
instruction to jump if the branch test passes.
This procedure clobbers the assembler temporary TMP, so TMP can no
longer be used in a branch test or in the branch delay slot of a
relative branch. Because TMP can't be used in a branch test, a
new temporary is introduced CMPRES2. This change replaces TMP with
CMPRES1 or another register where TMP can no longer be used.
Tests that were failing due to a too-far relative have the
--mips-far-branches flag set.
R=regis@google.com
Review URL: https://codereview.chromium.org//20369003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25543 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 23:30:32 +00:00
lrn@google.com
6f6ed505a3
Fix bug in list test.
...
The test assumed that the return of a typeddata-list's toList method
did not have a generic type parameter, as it should have.
BUG=http://dartbug.com/10708
R=floitsch@google.com
Review URL: https://codereview.chromium.org//15952006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23382 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 07:03:54 +00:00
floitsch@google.com
5d058bb0eb
Adding isNotEmpty property to collection and string.
...
BUG= http://dartbug.com/3074
R=floitsch@google.com
Review URL: https://codereview.chromium.org//15263004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23294 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 17:30:37 +00:00
lrn@google.com
4214819184
Mark list_test as failing on browsers.
...
Seems to be failing in UInt8List.operator[] with invalid argument.
BUG=http://dartbug.com/10174
Review URL: https://codereview.chromium.org//14178017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21945 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 12:58:01 +00:00
lrn@google.com
e0e13fe852
Fix missing concurrency check in [].forEach.
...
Also fix a bad range check for List.setRange.
Added more tests.
BUG=http://dartbug.com/10045
Review URL: https://codereview.chromium.org//14468004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21935 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 09:34:17 +00:00
ager@google.com
4f1a6eccc4
More fixes. Thanks to Slava for reminding me of check-function-fingerprints flag.
...
R=asiva@google.com , floitsch@google.com , srdjan@google.com
BUG=
Review URL: https://codereview.chromium.org//14042012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21875 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 12:23:27 +00:00
lrn@google.com
554a845e4f
Make List.remove return boolean.
...
Remove Queue implementations' remove methods, which are not in the
interface.
Added more tests for list operations.
Fixed bugs and omissions found by tests.
http://dartbug.com/10042
http://dartbug.com/10112
Review URL: https://codereview.chromium.org//14425003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21867 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 11:13:17 +00:00
lrn@google.com
77c8b06377
Make the analyzer happy about collections.
...
Fix some typing issues and a few real errors.
Review URL: https://codereview.chromium.org//14048002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21194 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-10 11:31:09 +00:00
floitsch@google.com
8fd6d0aafd
Remove Expect from core library.
...
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756
Review URL: https://codereview.chromium.org//12212016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
floitsch@google.com
5dc8107c53
Revert "Remove Expect from core library."
...
This reverts commit 19755.
Review URL: https://codereview.chromium.org//12743005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com
12dbd2fd70
Remove Expect from core library.
...
Review URL: https://codereview.chromium.org//12212016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
lrn@google.com
6b4f4b1bab
Change new List(n) to return fixed length list.
...
Deprecate List.fixedLength, add List.filled.
Make Iterable.toList and List.from take "growable" argument,
defaulting to false.
Review URL: https://codereview.chromium.org//12328104
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19112 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 08:45:04 +00:00
lrn@google.com
9b23dff467
Reapply "Rename mappedBy to map."
...
This reverts commit r17907.
TBR.
Review URL: https://codereview.chromium.org//12090093
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17918 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 15:12:56 +00:00
floitsch@google.com
b1a118d5ce
Revert "Rename mappedBy to map."
...
This reverts commit 17899.
Review URL: https://codereview.chromium.org//12087103
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17907 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 14:02:27 +00:00
lrn@google.com
0dc2f4b1ba
Rename mappedBy to map.
...
Retain a deprecated mappedBy for now.
Change return type of mappedBy, skip and take on List to Iterable.
BUG= http://dartbug.com/8063
BUG= http://dartbug.com/8064
BUG= http://dartbug.com/6739
BUG= http://dartbug.com/7982
Review URL: https://codereview.chromium.org//12086062
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17899 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-31 12:37:13 +00:00
floitsch@google.com
4a7dfd2da3
Big merge from experimental to bleeding edge.
...
Review URL: https://codereview.chromium.org//11783009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
floitsch@google.com
09f6d09d88
Make isEmpty a getter.
...
Review URL: https://codereview.chromium.org//11238035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14022 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 15:04:32 +00:00
lrn@google.com
a083c1a108
Removed IllegalAccessException and UnsupportedOperationException.
...
Both were converted to StateError.
Review URL: https://codereview.chromium.org//11235054
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14012 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-24 12:36:10 +00:00
kasperl@google.com
8bd4bf096b
Update almost all tests (except co19) to use the new try-catch syntax.
...
R=ngeoffray@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10891020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11492 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-29 08:11:41 +00:00
kasperl@google.com
feb05c33c3
Stop mapping indexOf/lastIndexOf directly to the JavaScript native on indexable primitives.
...
Fixes http://dartbug.com/3689 .
R=ahe@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10553034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8790 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 13:17:17 +00:00
sigmund@google.com
d9eae90196
test rename overhaul: step 7 - corelib tests
...
Review URL: https://chromiumcodereview.appspot.com//10244009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7096 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 18:06:37 +00:00