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

Add position and pass msg to underlying func in InDeltaMapValues, InDeltaMapValues, and InEpsilonSlice #1514

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hendrywiranto
Copy link
Contributor

@hendrywiranto hendrywiranto commented Dec 3, 2023

Summary

Add position and pass msg to underlying func in InDeltaSlice, InDeltaMapValues, and InEpsilonSlice

Changes

  • Add position information into the msgAndArgs slice in those 3 funcs
    • at index: for slice index
    • at key: for map key

Motivation

When using those 3 functions, users don't know which key/index of the map/slice that produces the error because currently it's not added into the msgAndArgs slice.

Example

InDeltaSlice

Before
image

After
image

InDeltaMapValues

Before
image

After
image

InEpsilonSlice

Before
image

After
image

@brackendawson brackendawson added this to the v1.8.6 milestone Feb 23, 2024
@brackendawson brackendawson modified the milestones: v1.9.1, v1.10 Mar 5, 2024
@dolmen dolmen added pkg-assert Change related to package testify/assert pkg-require Change related to package testify/require assert.InEpsilon About assert.InEpsilon and family labels Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert.InEpsilon About assert.InEpsilon and family pkg-assert Change related to package testify/assert pkg-require Change related to package testify/require
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants