-
Notifications
You must be signed in to change notification settings - Fork 763
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
class library: event - fix group in grain event #3483
Conversation
We need to either call `asControlInput` or `value` to get the group, because by default it is a function. `asControlInput` is more general, it will also work for Group objects.
Thanks! Can you please add a unit test for this? (Not familiar with this code so apologies in advance if that's asking a lot) |
ok, I'll do that. |
this is ✔️ for 3.9.1 |
We should fix all affected event types in the main class library (from #3481: "This is a bug now in many of the event types"). We get bugs like this by making a global change and testing only one case. We keep bugs like this by fixing them on a case-by-case basis. |
Ok, I did a quick sweep of Event.sc and EventTypesWithCleanup.sc and it seems \grain was the only one missing the conversion. So I think this is good to go. Thanks, Julian! |
I'll write a test that covers a little more than this case. |
Event tests should point to the server’s defaults.
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.
Builds on Linux. Test passed all runs.
testsuite/classlibrary/TestEvent.sc
Outdated
@@ -102,7 +102,98 @@ TestEvent : UnitTest { | |||
|
|||
} | |||
|
|||
test_server_messages { | |||
test_server_message_head_type_grain { | |||
this.assertEqualServerMessage(\grain, [ 9, \default, -1, 0, this.defaultGroupID]) |
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.
whitespace: don't put spaces after [
or before ]
, use exactly one space after ,
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 didn't put them there personally, but I can remove them ;)
testsuite/classlibrary/TestEvent.sc
Outdated
|
||
|
||
|
||
|
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.
too many blank lines
Fixes: #3481.
Quick test: