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

exercises: tests: remove comptime #211

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Mar 3, 2023

Rationale:

  • There is no more comptime in the tests that can potentially confuse a user. It was required in some of these exercises, e.g. when we wrote something like expected = 42.
  • Test failure messages at comptime can sometimes be more confusing (see e.g. 7dc446e).
  • The main downside is that, for some exercises, we no longer support the user returning a signed integer instead of an unsigned integer. But that's OK.

With this PR, the only remaining occurrence of comptime in this repo is in the binary-search example solution:

$ git rev-parse --short HEAD
06e7bce
$ git grep --break --heading comptime
exercises/practice/binary:search/.meta/example.zig
7:pub fn binarySearch(comptime T: type, target: T, buffer: ?[]const T) SearchError!usize {

@ee7 ee7 requested a review from ErikSchierboom March 3, 2023 12:07
@ee7 ee7 changed the title exercises: remove comptime exercises: tests: remove comptime Mar 3, 2023
@ee7 ee7 force-pushed the exercises-remove-comptime branch from 17c148d to 06e7bce Compare March 3, 2023 13:33
@ee7 ee7 marked this pull request as ready for review March 3, 2023 15:43
@ee7 ee7 merged commit d7cb6ca into exercism:main Mar 3, 2023
@ee7 ee7 deleted the exercises-remove-comptime branch March 3, 2023 15:46
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