mudasobwa
Creator of Cure
I am not sure it deserves to be discussed in the mailing list, so I’d start here.
assert/1 and/or refute/1 macros print the following error message when they fail during a direct comparison
Error: test/file:line
Expected truthy, got false
code: assert value >= min_value and value <= max_value
stacktrace:
test/file:line: anonymous fn/3 in Test
It would be extremely helpful to print the binding reduced to the variables used in the expression, like
...
code: assert value >= min_value and value <= max_value
binding: value: 1.0, min_value: 2.0, max_value: 3.0
It’s an easy change and if there is an interest, I am open to either start a discussion in the mailing list or straight provide a PR doing this.
Trending in Proposals: Ideas
We are seeing a lot of warning logs like this:
navigate event to "https://someurl" failed because you are redirecting across live_sessio...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security











Showing Posts 1 to 2- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
brettbeatty
Would this just be for more complex expressions? For very basic comparisons, we already get the left/right printouts:
And that works with function calls as well
If only the bindings were shown for something like this, you would see the value of
inputbut not the more important value ofcalculate(input).One could argue you would want to store the result in a variable for more complex comparisons, but maybe instead of just bindings it could be preferable to have a step-through of evaluation? Something like
I don’t love that, though. But I’m not sure how best to show calculated values.
mudasobwa
Well, I thought it would be a good addition to all of them. Yes, basic expressions do already print
leftandright, but even in your example it might be helpful to seeinputas well viabindingsto quickly figure out whycalculate(input)resulted in1. LikeIt costs nothing but would play the role of binding inspector.