-
Notifications
You must be signed in to change notification settings - Fork 14
Fix analyzer warnings in parser_test.dart #25
Conversation
test/parser_test.dart
Outdated
@@ -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; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
test/parser_test.dart
Outdated
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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...
There was a problem hiding this 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.
…rgan-patch-1 Fix analyzer warnings in parser_test.dart
No description provided.