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

Support comparing byte slice #1202

Merged
merged 2 commits into from Jun 21, 2022
Merged

Conversation

rleungx
Copy link
Contributor

@rleungx rleungx commented Jun 13, 2022

Signed-off-by: Ryan Leung rleungx@gmail.com

Summary

Support comparing byte slice

Changes

Add byte slice in the compare function.

Motivation

func TestByteSlice(t *testing.T) {
	re := require.New(t)
	objs := [][]byte{[]byte("abc"), []byte("abcd"), []byte("abcde")}
	testcase := []byte("ab")

	for _, obj := range objs {
		re.Less(testcase, obj)
	}
}

Related issues

Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx marked this pull request as ready for review Jun 13, 2022
assert/assertion_compare.go Outdated Show resolved Hide resolved
Signed-off-by: Ryan Leung <rleungx@gmail.com>
@rleungx rleungx requested a review from boyan-soubachov Jun 21, 2022
Copy link
Collaborator

@boyan-soubachov boyan-soubachov left a comment

Thank you for your contribution :)

@boyan-soubachov boyan-soubachov merged commit c31ea03 into stretchr:master Jun 21, 2022
3 checks passed
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.

None yet

2 participants