File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,14 @@ func TestIsMapHasKey(t *testing.T) {
154154 "a" : 1 ,
155155 1 : 2 ,
156156 }, "a" ))
157+ assert .NotTrue (isMapHasKey (map [any ]int {
158+ "a" : 1 ,
159+ 1 : 2 ,
160+ }, 2 ))
161+ assert .NotTrue (isMapHasKey (map [any ]int {
162+ "a" : 1 ,
163+ 1 : 2 ,
164+ }, "b" ))
157165 assert .NotTrue (isMapHasKey (map [any ]int {
158166 "a" : 1 ,
159167 1 : 2 ,
@@ -177,6 +185,26 @@ func TestIsMapHasValue(t *testing.T) {
177185 "a" : 1 ,
178186 "b" : 2 ,
179187 }, true ))
188+ assert .True (isMapHasValue (map [any ]any {
189+ "a" : "b" ,
190+ 1 : 2 ,
191+ }, "b" ))
192+ assert .True (isMapHasValue (map [any ]any {
193+ "a" : "b" ,
194+ 1 : 2 ,
195+ }, 2 ))
196+ assert .NotTrue (isMapHasValue (map [any ]any {
197+ "a" : "b" ,
198+ 1 : 2 ,
199+ }, "a" ))
200+ assert .NotTrue (isMapHasValue (map [any ]any {
201+ "a" : "b" ,
202+ 1 : 2 ,
203+ }, 1 ))
204+ assert .NotTrue (isMapHasValue (map [any ]any {
205+ "a" : "b" ,
206+ 1 : 2 ,
207+ }, 1.1 ))
180208}
181209
182210func TestIsNil (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments