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

redo (assert) for better error messages #274

Merged
merged 2 commits into from
Apr 8, 2023
Merged

redo (assert) for better error messages #274

merged 2 commits into from
Apr 8, 2023

Conversation

vito
Copy link
Owner

@vito vito commented Apr 8, 2023

Old: (assert (= 1 foo)), error: assertion failed: (= 1 foo)

New: (assert = 1 foo), error: assertion failed: (= 1 2)

It's also marked as ^:indent meaning you can format it like this:

(assert = "1,2,3"
  (strings:join "," [1 2 3]))

Old:

  (assert (= 1 foo))
  error: `assertion failed: (= 1 foo)`

New:

  (assert = 1 foo)
  error: `assertion failed: (= 1 2)`

It's also marked as `^:indent` meaning you can format it like this:

  (assert = "1,2,3"
    (strings:join "," [1 2 3]))
@vito vito force-pushed the better-assert branch 4 times, most recently from 7381ff0 to a9fd03d Compare April 8, 2023 03:03
@vito vito merged commit 5b1bba7 into main Apr 8, 2023
@vito vito deleted the better-assert branch April 8, 2023 03:14
@vito vito added enhancement New feature or request breaking Removes or replaces previously supported functionality labels Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Removes or replaces previously supported functionality enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant