Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ansionfor
Copy link
Member

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants