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

feat(test/gtest): add map type support for AssertNI/AssertIN #4135

Merged
merged 5 commits into from
Jan 23, 2025

Conversation

ansionfor
Copy link
Contributor

AssertNI/AssertIN func support map type

func TestAssertIN_Map(t *testing.T) {
	gtest.C(t, func(t *gtest.T) {
		t.AssertIN("k1", map[string]string{"k1": "v1", "k2": "v2"})
		t.AssertIN(1, map[int64]string{1: "v1", 2: "v2"})
		t.AssertIN([]string{"k1", "k2"}, map[string]string{"k1": "v1", "k2": "v2"})
	})
}

func TestAssertNI_Map(t *testing.T) {
	gtest.C(t, func(t *gtest.T) {
		t.AssertNI("k3", map[string]string{"k1": "v1", "k2": "v2"})
		t.AssertNI(3, map[int64]string{1: "v1", 2: "v2"})
		t.AssertNI([]string{"k3", "k4"}, map[string]string{"k1": "v1", "k2": "v2"})
	})
}

@gqcn gqcn changed the title feat(test/gtest): AssertNI/AssertIN support map type feat(test/gtest): add map type support for AssertNI/AssertIN Jan 23, 2025
@gqcn gqcn added the #👍 label Jan 23, 2025
@gqcn gqcn merged commit 20b1987 into gogf:master Jan 23, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants