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) {
154
154
"a" : 1 ,
155
155
1 : 2 ,
156
156
}, "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" ))
157
165
assert .NotTrue (isMapHasKey (map [any ]int {
158
166
"a" : 1 ,
159
167
1 : 2 ,
@@ -177,6 +185,26 @@ func TestIsMapHasValue(t *testing.T) {
177
185
"a" : 1 ,
178
186
"b" : 2 ,
179
187
}, 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 ))
180
208
}
181
209
182
210
func TestIsNil (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments