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 June 13, 2022 11:33
Signed-off-by: Ryan Leung <rleungx@gmail.com>
Copy link
Collaborator

@boyan-soubachov boyan-soubachov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution :)

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