|
25 | 25 | @test (x=4, y=5, z=6)[1:2] == (x=4, y=5)
|
26 | 26 | @test (x=4, y=5, z=6)[[1,3]] == (x=4, z=6)
|
27 | 27 | @test (x=4, y=5, z=6)[[:x,:y]] == (x=4, y=5)
|
| 28 | +@test (x=4, y=5, z=6)[[true, true, false]] == (x=4, y=5) |
| 29 | +@test (x=4, y=5, z=6)[[true, true, true]] == (x=4, y=5, z=6) |
| 30 | +@test (x=4, y=5, z=6)[[false, false, false]] == NamedTuple() |
| 31 | +@test (x=4, y=5, z=6)[Int[]] == NamedTuple() |
| 32 | +@test_throws BoundsError (x=4, y=5, z=6)[[true, true]] |
| 33 | +@test_throws ArgumentError (x=4, y=5, z=6)[true] |
| 34 | +@test (x=4, y=5, z=6)[0x01] == (x=4, y=5, z=6)[Int16(1)] == 4 |
| 35 | +@test (x=4, y=5, z=6)[0x01:0x01] == (x=4, y=5, z=6)[[Int16(1)]] == (x=4,) |
28 | 36 | @test_throws ErrorException (x=4, y=5, z=6).a
|
29 | 37 | @test_throws BoundsError (a=2,)[0]
|
30 | 38 | @test_throws BoundsError (a=2,)[2]
|
|
0 commit comments