-
Notifications
You must be signed in to change notification settings - Fork 13
Add 'issue' and 'reason' parameters to FailingTest. #23
Conversation
devoncarew
left a comment
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 like the idea of being able to have free-form text as a single positional param, and then being able to opt-into better toolability via named params.
@FailingTest('whoops')
@FailingTest('whoops', issue: 'http:/...')
instead of:
@FailingTest(reason: 'whoops', issue: 'http:/...')
As the first is slightly more terse when you just want to pass a reason. But I'm ok w/ landing either way, and seeing how it feels to use it.
lib/test_reflective_loader.dart
Outdated
| */ | ||
| class FailingTest { | ||
| /** | ||
| * Initialize this annotation with the given issue URI. |
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.
with the given issue URI ==> with the given arguments
| /** | ||
| * Initialize this annotation with the given issue URI. | ||
| * | ||
| * [issue] is a full URI describing the failure and used for tracking. |
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.
reason first, and then issue?
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.
Alphabetic order lgtm.
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.
If there is an unnamed parameter, and you only want to include an issue number, then you have to write:
@FailingTest('', issue: '...')
Which seems silly. I suspect that this is one of the reasons Flutter chose to make all parameters named, even when some are required,
| /** | ||
| * Initialize this annotation with the given issue URI. | ||
| * | ||
| * [issue] is a full URI describing the failure and used for tracking. |
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.
Alphabetic order lgtm.
No description provided.