Skip to content

Fix refute_in_delta boundary logic and negative delta - #15623

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
AlexGx:ag-refute_in_delta-fix
Jul 16, 2026
Merged

Fix refute_in_delta boundary logic and negative delta#15623
josevalim merged 1 commit into
elixir-lang:mainfrom
AlexGx:ag-refute_in_delta-fix

Conversation

@AlexGx

@AlexGx AlexGx commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Current refute_in_delta/4 impl is not consistent with assert_in_delta/4 (does not acts as full opposite on boundary cases)

iex> assert_in_delta(10, 15, 5)
iex> refute_in_delta(10, 15, 5)
false # expected ** (ExUnit.AssertionError) 

Changes

  • fix boundary logic
  • add missing negative delta guard
  • assertion message in refute/assert_in_delta (positive -> non-negative)
  • tests updated

@josevalim
josevalim merged commit 51ac6a5 into elixir-lang:main Jul 16, 2026
15 checks passed
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

@AlexGx
AlexGx deleted the ag-refute_in_delta-fix branch July 16, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants