|
49 | 49 | @test !isequal(Some(1), nothing)
|
50 | 50 | @test !isequal(Some(nothing), nothing)
|
51 | 51 |
|
| 52 | +# Some with something else is false |
| 53 | +@test !=(Some(nothing), nothing) |
| 54 | +@test !=(nothing, Some(nothing)) |
| 55 | + |
| 56 | +# Two `Some`s forward to their wrapped things |
| 57 | +@test ==(Some([0x1]), Some([1])) |
| 58 | + |
| 59 | +# propagate wrapped missings |
| 60 | +@test !=(Some(1), Some(missing)) isa Missing |
| 61 | +@test !=(Some(missing), Some(1)) isa Missing |
| 62 | +@test ==(Some(missing), Some(missing)) isa Missing |
| 63 | + |
| 64 | +# Make sure to still propagate non-wrapped Missing |
| 65 | +@test ==(Some(1), missing) isa Missing |
| 66 | +@test ==(missing, Some(1)) isa Missing |
| 67 | + |
| 68 | +@test isequal(Some([0x1]), Some([1])) |
| 69 | +@test !isequal(missing, Some(missing)) |
| 70 | +@test !isequal(Some(missing), missing) |
| 71 | +@test isequal(Some(missing), Some(missing)) |
| 72 | + |
| 73 | +# hashing implications |
| 74 | +@test hash(Some(0x1)) != hash(0x1) |
| 75 | +@test hash(Some(0x1)) == hash(Some(1)) |
| 76 | +@test hash((Some(1),)) != hash((1, Some)) |
| 77 | + |
52 | 78 | @testset "something" begin
|
53 | 79 | @test_throws ArgumentError something()
|
54 | 80 | @test something(1) === 1
|
|
0 commit comments