Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Fix 2 tests #93

Merged
merged 4 commits into from
May 7, 2018
Merged

Fix 2 tests #93

merged 4 commits into from
May 7, 2018

Conversation

lrhn
Copy link
Contributor

@lrhn lrhn commented May 2, 2018

Fix two tests to be Dart 2 type-safe.

Clean up test/wrapper_test.dart signficantly.
Add enough type annotations to test/unmodifiable_collection_test.dart to get the necessary inference.
Update dependency on SDK to allow using the new Invocation constructor.

Another partial fix of dart-lang/core#591.

lrhn added 2 commits May 2, 2018 15:37
Clean up test/wrapper_test.dart signficantly.
Add enough type annotations to test/unmodifiable_collection_test.dart
to get the necessary inference.
Update dependency on SDK to allow using the new `Invocation` constructor.
@lrhn lrhn requested a review from nex3 May 2, 2018 14:51
@lrhn lrhn requested a review from keertip May 2, 2018 14:57
void testNoWriteList(List original, List wrapped, String name) {
List copy = new List.from(original);
void testNoWriteList(List<int> original, List<int> wrapped, String name) {
var copy = new List<int>.from(original);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use .of() here and below to avoid the explicit annotation?

Copy link
Contributor Author

@lrhn lrhn May 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems so. Good catch. Changed all .from to .of, just for good measure.

List<Type> get typeArguments => const <Type>[];

bool get isMethod => _type == METHOD;
// Parameterization of noSuchMethod. Calles [_action] on every
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Calles" -> "Calls"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops. Thanks.

Copy link

@keertip keertip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lrhn lrhn merged commit 0a34d50 into master May 7, 2018
@kevmoo kevmoo deleted the fix-2-tests branch June 13, 2018 05:18
mosuem pushed a commit to dart-lang/core that referenced this pull request Oct 18, 2024
Fix two tests to be Dart 2 type-safe.

Clean up test/wrapper_test.dart signficantly.
Add enough type annotations to test/unmodifiable_collection_test.dart
to get the necessary inference.
Update dependency on SDK to allow using the new `Invocation` constructor.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants