Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Fix analyzer warnings in parser_test.dart #25

Merged
merged 2 commits into from
Dec 12, 2017
Merged

Conversation

davidmorgan
Copy link
Contributor

No description provided.

@@ -329,14 +329,14 @@ main() {
MAP_WITH_SOURCE_LOCATION,
MAP_WITH_SOURCE_LOCATION_AND_NAME
]) {
var mapping = parseJson(expected);
var mapping = parseJson(expected) as SingleMapping;
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: why not
SingleMapping mapping = parseJson(expected);
?
Then the second "as SingleMapping" can be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

expect(mapping.toJson(), equals(expected));
}
// Invalid for this case
expect(() => parseJson(SOURCE_MAP_BUNDLE as dynamic), throws);
expect(() => parseJson(SOURCE_MAP_BUNDLE as dynamic), throws) as MappingBundle;
Copy link
Contributor

Choose a reason for hiding this comment

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

this line makes no sense. Does this even compile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, copy+paste error. Should have added to the next line...

Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

lgtm once the strange as SingleMapping in the expect statement is removed.

@davidmorgan davidmorgan merged commit 96e5be3 into master Dec 12, 2017
@davidmorgan davidmorgan deleted the davidmorgan-patch-1 branch December 12, 2017 17:13
mosuem pushed a commit to dart-lang/tools that referenced this pull request Dec 10, 2024
…rgan-patch-1

Fix analyzer warnings in parser_test.dart
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

3 participants