-
-
Notifications
You must be signed in to change notification settings - Fork 89
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
Exercise test structure #150
Comments
This is a good question. I think that it is for the team to enforce as we feel appropriate. I know on the Java track we deviate from the canonical data slightly as and when it suits the exercise. The biggest thing we have to consider is how tests will be run. Once we enforce methods in our tests then everyone will have to program using them. For some exercises, this may be beneficial, whereas for others it might be excessive. Either way, I think the most important thing will be to enforce whatever decision we come to consistently. I can see benefits to using functions across the board, but would be interested to hear what everyone else thinks. |
Can you list the benefits you can think of? |
Benefits:
Cons:
|
@kotp @Smarticles101 @kenden what do you guys think? |
I don't have a strong opinion on this but
|
Looks like we have an agreement on this. We will not use functions for tests unless the problems are complex or require them (ex: https://github.com/exercism/bash/blob/master/exercises/triangle/triangle_test.sh) I agree with @sjwarner-bp points:
and we can address those in: #87. |
My question here: exercism/problem-specifications#1070 (comment) was to know if we need to enforce the rules of the problem-specifications in our tests.
Requiring the
property
does not look that it's something that is critical and should be enforced, my reasoning being that everyone should be free to structure their code as their wish, some people will do a big procedure, no functions, others will do multiple functions.If you look at: https://github.com/exercism/bash/blob/master/exercises/armstrong-numbers/armstrong_numbers_test.sh, you will see that we require the user to create a function in the tests.
In contrast, for exercises like this: https://github.com/exercism/bash/blob/master/exercises/triangle/triangle_test.sh is pretty much required.
What do you think about not forcing the user to add functions unless the exercises are dependent on them, ex:
triangle
, and let the user decide how to structure their implementations?The text was updated successfully, but these errors were encountered: