-
-
Notifications
You must be signed in to change notification settings - Fork 52
Add darts
#539
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
base: main
Are you sure you want to change the base?
Add darts
#539
Conversation
Looks pretty good to me! Do you want to take a stab at creating a test generator for this one? |
I'm having trouble running test_gen even though I have a local copy of problem specifications (see bottom). My current template adapted from knapsack seems to get most of the way, but I manually converted the integral X and Y values into floats for simplicity. Is there a way I can reflect that in the template? open Base
open OUnit2
open Darts
let ae exp got _test_ctxt =
let printer = Int.to_string in
assert_equal exp got ~printer
let tests = [
{{#cases}}
"{{description}}" >::
ae {{#input}}{{expected}} ({{property}} ({{x}}) ({{y}})){{/input}};
{{/cases}}
]
let () =
run_test_tt_main ("darts tests" >::: tests) Error message
|
I think we could format the |
Hey @BNAndras, just thought to ask how are you going with the handling the floats with template? Would you like me to have a look at it? |
I've been dealing with family matters this week, but I can probably work on it later this week. The major issue is that I can't run the test generator at the moment (see up-thread) so I can't confirm what the generated tests look like. |
Ok, no worries 😉 I just looked at the exception again and realized it says it can't find |
I was following the building section instructions, which didn't reference that. |
@kahgoh, I haven't been able to make progress so feel free to deal with the template generator. I figure you should add yourself as an exercise co-author at that point, but it's up to you. |
Hey @BNAndras, I'm not quite sure what the best way of going about it is, but I've added the template on my branch (on top of your commits). I've also raised a PR BNAndras#1 into your branch if that's easier. Could you see if you pull / merge it your PR branch? |
Template for darts exercise
Normally, I’d just edit the branch for the PR directly, but I don’t know if that’s the preferred way. |
Thanks! Looks good to me. Since I had a hand in writing the template, @georgyo could you please review? |
No description provided.