Commit Graph

480 Commits

Author SHA1 Message Date
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
Florian Loitsch 46ba54e315 Add @MirrorsUsed annotations to speed up tests.
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2727323002 .
2017-03-31 12:46:31 +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
Siva Annamalai 4bc53826f7 Add test case to regress case where fields of a closure are accessed (reproduces the problem we encountered in b/36131545)
BUG=
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2752803003 .
2017-03-15 13:41:47 -07:00
Stephen Adams fc56b59a88 Type of InstanceMirror on class should still be a ClassMirror when class has call method
BUG= https://github.com/dart-lang/sdk/issues/28864
R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2735983003 .
2017-03-07 17:08:44 -08:00
Kevin Millikin 508793071a Do not invoke fatal in dart:_internal when fuzzing mirrors
Add fatal from dart:_internal to the blacklist of functions we should
not invoke while fuzzing mirrors.  Invoking it will not succeed.

Arguably, mirrors should not be able to see any of the members of
dart:_internal but that's a bigger implementation change and possibly
a breaking change.

BUG=
R=kustermann@google.com

Review-Url: https://codereview.chromium.org/2687883002 .
2017-02-09 14:08:29 +01:00
Peter von der Ahé f5d9f29cae Use factory syntax in circular_factory_redirection_test.
R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2669233002 .
2017-02-06 11:03:01 +01:00
Zachary Anderson 63c4b6b1cb Revert "Remove package:unittest from some tests"
This reverts commit dde47b2aad.

Revert "Update Dartium status for passing test"

This reverts commit d71c70d56d.

Tests failing on dart2js and async_star_pause_test is
passing on Dartium. Need to think about how to update the
status files.

Review-Url: https://codereview.chromium.org/2656503004 .
2017-01-25 11:06:58 -08:00
Zachary Anderson dde47b2aad Remove package:unittest from some tests
package:unittest is deprecated in favor of package:test.

R=fschneider@google.com

Review-Url: https://codereview.chromium.org/2656743002 .
2017-01-25 08:50:02 -08:00
Regis Crelier 97c42acc30 Support FutureOr<T> in the VM (fixes #28010).
R=asiva@google.com, rmacnak@google.com

Review-Url: https://codereview.chromium.org/2642443002 .
2017-01-17 10:27:21 -08:00
Florian Loitsch 2547caab25 Reapply "reflectType() dynamic type arguments support (#26012)"
This was a pull request: 8a8033a417

MirrorsUsed doesn't transitively include reflective information. However, it must still be able to create TypeMirrors for types that are used as return- or parameter types.

Initially, the patch checked that TypeMirrors had the correct number of arguments for generic types. This is now disabled.

A better approach would be to know if a class has full reflective information, or not. But this would require much bigger changes to the system.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2615943004 .
2017-01-10 15:53:21 +01:00
Asger Feldthaus 6bae3151e2 Revert "reflectType() dynamic type arguments support (#26012)"
This reverts commit 8a8033a417.

There are a bunch of dart2js mirror tests that fail.

Issue https://github.com/dart-lang/sdk/pull/26012

BUG=

Review-Url: https://codereview.chromium.org/2617163002 .
2017-01-06 19:12:27 +01:00
Anatoly Pulyaevskiy 8a8033a417 reflectType() dynamic type arguments support (#26012)
* Basic implementation of reflecting generic types using dynamic list of type arguments

* Removed redundant expectation in test

* Added basic support for dynamic type arguments in reflectType of js_mirrors

* Fixes according to code review comments: major cleanup, added more test cases and updated docs

* Updated JS mirrors reflectType() to match behavior of VM implementation

* Terminate exception messages with a dot; Improved error handling for empty argument list and type checks;

* Use NumTypeParameters when checking provided argument list size

* Check if type arguments are malbounded; added test cases for typedefs and mixins

* Uncommented a test case

* Updated lib.status to mark some tests as failing in dart2js due to limitations in JS mirrors

* Fixed mixin test mock definition; updated configuration for tests requiring checked mode

* Handle nested generic types in type argument parsing (JS)
2017-01-06 06:05:14 -08:00
Regis Crelier e8d1c09d34 Add mirrors tests for Null type.
R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2617743002 .
2017-01-05 13:27:14 -08:00
Johnni Winther e4c612fc3e Handle forwarding constructors of unnamed mixin applications for reflection
R=sigmund@google.com

Review URL: https://codereview.chromium.org/2519383002 .
2016-11-22 15:58:50 +01:00
Regis Crelier bab552edaf Fix mirrors to keep typedef as scope class of function types (fixes #26187).
Add mirror regression test.
Adjust expectation of a mirror test.
Fix parser to mark current class as typedef before parsing signature.
Fix canonicalization of typedef function types (a typedef class can be the scope
class of more than one function type, even if not generic).

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1890013002 .
2016-04-15 13:21:22 -07:00
Ryan Macnak 71676a1e5b Use exact name lookup for static fields in mirrors.
R=hausner@google.com

Review URL: https://codereview.chromium.org/1877813003 .
2016-04-12 11:15:38 -07:00
Siva Annamalai 341643cb2b Do not compile a class when the class mirror tries to access the metadata.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1834673003 .
2016-03-28 11:16:15 -07:00
Stephen Adams e3810ceff2 Use existing test for reflectClass(List).createInstance(...)
TBR=asgerf@google.com

Review URL: https://codereview.chromium.org/1632163004 .
2016-01-25 21:58:14 -08:00
Stephen Adams 4a01c6a1cf List constructor sentinel must not implement 'int' (extend JSInt).
Having a regular object that 'is' a number was causing horrible problems for type inference and generated code quality.

To get this to work required fixes in type inference and the collection of reified default argument values.

Fixes issue https://github.com/dart-lang/sdk/issues/25566

R=sigmund@google.com

Review URL: https://codereview.chromium.org/1629553002 .
2016-01-25 20:40:39 -08:00
Johnni Winther 306537be79 Add test of unittests.
BUG=
R=sigurdm@google.com

Review URL: https://codereview.chromium.org/1562023002.
2016-01-06 13:19:41 +01:00
Ryan Macnak c740fea545 VM: Fix crash parsing metadata with a closure as a const constructor argument.
BUG=http://dartbug.com/25240
R=hausner@google.com

Review URL: https://codereview.chromium.org/1534033003 .
2015-12-17 17:18:01 -08:00
William Hesse 13bf8ff9f8 Breaking Change: merge BoringSSL branch into master
This replaces the NSS secure networking library from Mozilla
with the BoringSSL library from Google. This library, based
on OpenSSL, reads certificates from files in PEM format, rather
than storing certificates and keys in a SQLite database, the
way NSS does. There will be a blog post, changelog entries,
and other documentation of the breaking changes.

Review URL: https://codereview.chromium.org//1319703002 .
2015-08-26 14:42:12 +02:00
Florian Loitsch e42d46a593 Add test that uses function.apply and mirrors in the same file.
The import of mirrors is delayed, so that Function.apply is patched in before it is visible that mirrors are used.

R=sigmund@google.com

Review URL: https://codereview.chromium.org//1274633002 .
2015-08-07 11:20:33 +02:00
Ryan Macnak b6c979f20b Hoist InstanceMirror.delegate to ObjectMirror.
BUG=http://dartbug.com/14827
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1273983002 .
2015-08-05 17:09:59 -07:00
Ryan Macnak db8ed04981 Hack around dart:io being loaded into non-service isolates in Dartium.
BUG=http://dartbug.com/23940
R=asiva@google.com

Review URL: https://codereview.chromium.org//1259893006 .
2015-08-03 16:59:32 -07:00
Ryan Macnak bc90a5e1f0 Fix getField optimization when the selector is an operator.
BUG=http://dartbug.com/23880
R=asiva@google.com

Review URL: https://codereview.chromium.org//1247733005 .
2015-07-22 13:39:07 -07:00
Stephan Herhut 0799e538c3 dart2js: Emit static const fields if accessible by reflections.
BUG= http://dartbug.com/23811
R=floitsch@google.com

Review URL: https://codereview.chromium.org//1225083004.
2015-07-09 13:28:23 +02:00
William Hesse 57765a8929 Ensure correct line endings for method_mirror_source tests.
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1218813002.
2015-06-29 13:43:57 +02:00
Stephan Herhut 225be75498 Fix some tests and exclude others from CRLF rewriting.
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//1212823002.
2015-06-26 14:40:01 +02:00
Ryan Macnak 98b9ff6a30 Fix reflective NoSuchMethodErrors to match their non-reflective counterparts when due to argument mismatches.
BUG=http://dartbug.com/23266
R=asiva@google.com

Review URL: https://codereview.chromium.org//1182613004.
2015-06-16 09:42:11 -07:00
Ryan Macnak daf6fb6091 Ensure libraries always have at least one top-level class and therefore at least one script.
BUG=http://dartbug.com/23483
R=hausner@google.com

Review URL: https://codereview.chromium.org//1131793012
2015-05-19 08:58:23 -07:00
johnmccutchan@google.com e28075ceb7 Fix invocation_fuzz_test
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45659 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 21:31:47 +00:00
johnmccutchan@google.com a25e355731 Add hasStoppedAtBreakpoint
BUG=
R=turnidge@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45532 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-05 17:30:19 +00:00
rmacnak@google.com a6e42c48b5 Deal with deferred loading in the VM mirrors.
- Invalidate MirrorSystem.libraries when a load completes.
- Recheck if a deferred import's target has been loaded before failing.
- Allow loading libraries from a LibraryDepedencyMirror.
- Propogate compile-time error when attempting to reflect a deferred type.

BUG=http://dartbug.com/22592
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45444 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-28 23:47:45 +00:00
rmacnak@google.com 9f56280609 Add asserts that isolates have a root library set up before they become runnable.
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45224 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 00:44:47 +00:00
floitsch@google.com 46fa5bf3d0 Fix mirrors/invocation_fuzz_test.
BUG= http://dartbug.com/15566
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45075 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 18:21:30 +00:00
floitsch@google.com ffeedc00bf dart2js: retain constants that are used as annotations in constructors and setters.
BUG= http://dartbug.com/23128
R=herhut@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45064 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 13:10:11 +00:00
paulberry@google.com 81c933ca35 Fix static warning in lib/mirrors/method_mirror_source_test.
TBR=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44976 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 17:00:02 +00:00
rmacnak@google.com 766df03b1b Fix MethodMirror.source when the method is on the first line in a script.
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44957 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 01:02:48 +00:00
herhut@google.com f0320957ad Fix length computation on init.mangledNames.
BUG= http://dartbug.com/23054
R=zarah@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44831 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-01 12:29:24 +00:00
herhut@google.com faa03376b4 Clean up naming scheme for reflection names.
BUG= http://dartbug.com/22987
R=ahe@google.com

Committed: https://code.google.com/p/dart/source/detail?r=44732

Reverted: https://code.google.com/p/dart/source/detail?r=44733

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44736 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 14:43:02 +00:00
herhut@google.com 363b144eae Revert "Clean up naming scheme for reflection names."
This reverts commit r44732.

BUG=
TBR=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44733 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 13:38:50 +00:00
herhut@google.com 7719901f37 Clean up naming scheme for reflection names.
BUG= http://dartbug.com/22987
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44732 260f80e4-7a28-3924-810f-c04153c831b5
2015-03-27 12:28:04 +00:00