-
Notifications
You must be signed in to change notification settings - Fork 412
Add any_map
support
#158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add any_map
support
#158
Conversation
test('empty', () async { | ||
var builder = jsonSerializable(BuilderOptions.empty) as PartBuilder; | ||
expect(builder, isNotNull); | ||
expect(records, isEmpty); |
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.
Note that since the logs come through asynchronously you would never see them at this point, you would need to add an await null
or something along those lines. Not really sure the absolute best way to deal with it honestly.
config[entry.key] = entry.value; | ||
|
||
expect(() => jsonSerializable(new BuilderOptions(config)), | ||
_throwsCastError); |
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.
Worth checking the actual message here?
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.
I don't think so. They will all be 'String is not a bool' etc.
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.
Ya I was just wondering if you wanted to check the cast messages were correct, but its probably overkill
as PartBuilder; | ||
expect(builder, isNotNull); | ||
|
||
expect(records.single.message, |
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.
I don't get how this is passing given my comment above...
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.
as discussed...
@@ -38,21 +38,22 @@ KitchenSink _$KitchenSinkFromJson(Map<String, dynamic> json) => new KitchenSink( | |||
..stringDateTimeMap = json['stringDateTimeMap'] == null | |||
? null | |||
: new Map<String, DateTime>.fromIterables( | |||
(json['stringDateTimeMap'] as Map<String, dynamic>).keys, | |||
(json['stringDateTimeMap'] as Map).keys.cast<String>(), |
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: should we be using .map
instead?
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.
Same-same, right? This seems easier...
No description provided.