Skip to content

Commit

Permalink
Add more equality tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tokazama committed Jul 7, 2020
1 parent ab4ef6e commit 705c943
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "AxisIndices"
uuid = "f52c9ee2-1b1c-4fd8-8546-6350938c7f11"
authors = ["Tokazama <zchristensen7@gmail.com>"]
version = "0.5"
version = "0.5.1"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
26 changes: 13 additions & 13 deletions test/functions_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,24 @@
end
=#

#= TODO
@testset "equality" begin
nda = AxisArray([10 20; 30 40], (:x, :y))
nda2 = AxisArray([10 20; 30 40], (:x, :_))
nda3 = AxisArray([10 20; 30 40], (:x, :z))
nda4 = AxisArray([11 22; 33 44], (:x, :y))
ndv = AxisArray([10, 20, 30], (:x,))
a = AxisArray([10 20; 30 40])
a2 = AxisArray([10 20; 30 40])
a3 = AxisArray([10 20; 30 40])
a4 = AxisArray([11 22; 33 44])
v = AxisArray([10, 20, 30])

@testset "$eq" for eq in (Base.:(==), isequal, isapprox)
@test eq(nda, nda)
@test eq(nda, nda2)
@test eq(nda, nda3) == false
@test eq(nda, nda4) == false
@test eq(nda, ndv) == false
@test eq(a, a) == eq(parent(a), a) == eq(a, parent(a))
@test eq(a, a2)
@test eq(a, a3)
@test !eq(a, a4)
end
@test isapprox(nda, nda4; atol=2π)
@test isapprox(a, a4; atol=2π)
@test isapprox(a, parent(a4); atol=2π)
@test isapprox(parent(a), a4; atol=2π)
@test AxisArray(1:2) == SimpleAxis(1:2)
end
=#

end # Base

Expand Down

2 comments on commit 705c943

@Tokazama
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/17560

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 705c943ac30946f0a81dfa92d2120cc35deaed0a
git push origin v0.5.1

Please sign in to comment.