Skip to content

Commit 2eec089

Browse files
committed
Add some more merthods for testing equality when testing serialization
1 parent fdd14ab commit 2eec089

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/SerializationTests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ end
1818
function eq(x::LinuxPerf.ThreadStats, y::LinuxPerf.ThreadStats)
1919
return x.pid == y.pid && x.groups == y.groups
2020
end
21+
eq(x::Nothing, y) = isnothing(y)
22+
eq(x, y::Nothing) = isnothing(x)
23+
eq(x::Nothing, y::Nothing) = true
2124
eq(x::T, y::T) where {T} = isapprox(x, y)
2225

2326
function withtempdir(f::Function)

0 commit comments

Comments
 (0)