-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Actually call argument-less methods. #265
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -144,7 +144,10 @@ void main() { | |
| final StringBuffer sink = StringBuffer(); | ||
| generateDart(DartOptions(), root, sink); | ||
| final String code = sink.toString(); | ||
| expect(code, isNot(matches('=.*doSomething'))); | ||
| // The next line verifies that we're not setting a variable to the value of "doSomething", but | ||
| // ignores the line where we assert the value of the argument isn't null, since on that line | ||
| // we mention "doSomething" in the assertion message. | ||
| expect(code, isNot(matches('[^!]=.*doSomething'))); | ||
|
||
| expect(code, contains('doSomething(')); | ||
| expect(code, isNot(contains('.encode()'))); | ||
| }); | ||
|
|
||
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.
Is
messagealwaysnullwhenargTypeisvoid?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.
Do you mean in pigeon-generated code? Or?
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.
yup. pigeon-generated code
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.
it looks like
_writeHostApialways sends null if the argType is void, but of course people can always bypass pigeon and send whatever.