Skip to content
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

binary-search: Update tests #810

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

tasxatzial
Copy link
Member

@tasxatzial tasxatzial commented Feb 18, 2025

  • Changed to return -1 instead of some kind of error when value is not in the vector
  • Updated function template

Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@tasxatzial
Copy link
Member Author

I'm trying to change the description, but i'm not having any success. I'm trying

(defn update-test-case [test-case]
  (assoc test-case :description "new description"))

@tasxatzial
Copy link
Member Author

@ErikSchierboom Any idea why updating the description isn't working? Should the above code work, or am I missing something?

@ErikSchierboom
Copy link
Member

@tasxatzial That's because the description is overwritten later in the call chain:

(defn- test-case->data [idx node]
  (-> node
      (assoc :idx (inc idx)
             :description (str/join " ▶ " (:path node))
             :error (get-in node [:expected :error]))
      (dissoc :reimplements :comments :scenarios)))

That might not be the best design. Would you like me to have this happen before the update-test-case function is called?

@tasxatzial
Copy link
Member Author

I was just looking at that particular piece of code.

Would you like me to have this happen before the update-test-case function is called?

Yes, please :)

@ErikSchierboom
Copy link
Member

It'll be next week before I have time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants