@@ -149,6 +149,12 @@ using TestItemRunner
149149 length,
150150 (@f count (Returns (true ))),
151151 (@f count (@o _. i > 7 )),
152+ (@f any (Returns (true ))),
153+ (@f any (@o _. i > 7 )),
154+ (@f any (@o _. i > 100 )),
155+ (@f all (Returns (true ))),
156+ (@f all (@o _. i > 7 )),
157+ (@f all (@o _. i > 100 )),
152158 (@f sort (by= (@o (_. i, - _. j)), rev= true ) Iterators. drop (__, 5 ) first),
153159 (@f sort (by= (@o (_. i, - _. j)), rev= true ) Iterators. drop (__, 5 ) first (__, 1 ) only),
154160 (@f mean (@o _. i)),
@@ -261,11 +267,19 @@ end
261267 @test first (dct) == (x= 1.1 , y= " def" )
262268
263269 @test dct[(a= 1 , b= " a" )] == (x= 1.1 , y= " def" )
270+ @test dct[(b= " a" , a= 1 )] == (x= 1.1 , y= " def" )
264271 @test_throws KeyError ((a= 1 , b= " c" )) dct[(a= 1 , b= " c" )]
265272 @test_throws KeyError ((a= 1 , b= " c" )) dct[(a= 1 , b= " c" )] = (x= 1.3 , y= " ghi" )
273+ @test_throws AssertionError dct[123 ]
274+ @test_throws AssertionError dct[(a= 1 , b= " c" , c= " d" )]
266275 dct[(a= 1 , b= " a" )] = (x= 1.3 , y= " ghi" )
267276 @test dct[(a= 1 , b= " a" )] == (x= 1.3 , y= " ghi" )
268277
278+ @test haskey (dct, (a= 1 , b= " a" ))
279+ @test ! haskey (dct, (a= 1 , b= " c" ))
280+ @test_throws AssertionError haskey (dct, (a= 1 , b= " c" , c= " d" ))
281+ @test_throws AssertionError haskey (dct, 123 )
282+
269283 delete! (dct, (a= 1 , b= " a" ))
270284 @test_throws KeyError ((a= 1 , b= " a" )) delete! (dct, (a= 1 , b= " a" ))
271285 @test collect (dct) == [(x= 1.2 , y= " xyz" ), (x= 2.1 , y= " abc" )]
0 commit comments