-
Notifications
You must be signed in to change notification settings - Fork 757
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
include unittest into common #3168
Conversation
@danstowell @crucialfelix @telephon — as the original authors (according to the quarks file), maybe you want to comment / claim authorship? |
I didn't invent the class, possibly crucial did, though I did a fair amount of work with it. The proposal sounds OK to me. |
@@ -0,0 +1,56 @@ | |||
|
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 think these unit tests should go into testsuite
, shouldn't they?
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.
uhm, aren't they? filename reads testsuite/classlibrary/TestUnitTest.sc
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 could swear they read something else :)
agreed! TestMixedBundle should be reviewed and added to testsuite/classlibrary, |
can we make this master instead of 3.9? |
why? |
never mind, i was convinced at the dev meeting that 3.9 is fine |
MixedBundleTester is for testing MixedBundle (as one might expect) which is used by JITlib and crucial library and a few others. https://github.com/search?l=SuperCollider&q=MixedBundleTester&type=Code&utf8=%E2%9C%93 https://github.com/search?l=SuperCollider&q=MixedBundle&type=Code&utf8=%E2%9C%93 It is just like an OSCBundle but it also has event handlers. It executes functions at send time. That is why it is called "mixed" - I forget who named it that. I wouldn't bother to remove it as it does no harm and would causes significantly more work (with no gain) if you removed MixedBundle functionality. Basically it would break things permanently (again, with no actual gain). |
Not really. It tests that MixedBundle does what it says on the package. All unit tests test a unit - a single class - and ensure that it works as advertised. |
Just to make sure I'm not going crazy... this PR didn't actually put UnitTest in the class library, did it? It still has to be acquired via Quarks afaict. |
The PR description says
but no such directory exists.... |
sorry, there was a hickup in my git commiting for this branch... the branch that was merged now has it. 6b034df |
@LFSaw where/when was that merged? is it in develop only? |
never mind, i see it now, sorry. (on mobile) |
it takes more work than just including the files, because of Travis config. do you mind if i go ahead with #3218 |
go ahead. :) |
Problem
Since a while, SuperCollider development increasingly relies on
UnitTest
s to secure code stability.Most prominently, they are part of the testing framework around travis.
Not having UnitTesting capabilities in the core library makes the development process rely on a Quark extension. This seems to place it out of sight of developers.
Changes
To ease the process of UnitTesting and to encourage people to write
UnitTest
s, I propose to include the UnitTest framework (UnitTest, UnitTestResult, UnitTestScript
) into the main repository. This will also ensure that travis builds always use the right UnitTest framework for their tests.I copied the classes defined in the UnitTesting quark to
SCClassLibrary/Common/UnitTesting
and added the tests totestsuite/classlibrary
resp.testsuite/classlibrary/server
(server-related tests, according to #3161 ). Help files went toHelpSource
.To Do
MixedBundleTester
. It is an extension that might be useful for testing Bundles, however, there is no helpfile available, sourcecode documentation is sparse. Maybe @crucialfelix can shed some light?Related