-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Tests at compile time? #12
Comments
I'd prefer to use idris-testing. |
I'm not sure but I think this way of "testing" (it's rather the compiler ensuring, with the help of types, that the program is correct) doesn't apply to all problems. For example, in the "hello world" exercise, it's not obvious to me how to do something similar. (Maybe by changing the types?) |
I'll have a try with hello-world.
|
For the leap year and hello world exercises this works ok, but in general I'm opposed to it. If you wanted instead to prove theorems about properties of a given exercise, that would be ok. |
@yurrriq I agree. It would make sense to keep hello world as simple as can be -- for getting your feet wet with the exercism CLI, testing of Idris, ... -- and there's nothing keeping you from revisiting hello world (or leap year) to look into advanced features of Idris. This would then be another exercise, though. (I realise that this is not exactly what you proposed, but rather a slight variation of it. 😉 ) |
Closing this since we're going with the unit testing approach. |
You can do tests in Idris at compile time:
E.g. for the leap exercise:
@srenatus, @yurrriq: Any thoughts on if this is a better choice than the more traditional runtime testing?
The text was updated successfully, but these errors were encountered: