Skip to content

Commit 0b2c670

Browse files
committed
More axis tests
1 parent 40b6d5b commit 0b2c670

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/core.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ A = AxisArray(reshape(1:24, 2,3,4),
124124
@test @inferred(axes(A, Axis{:x})) == @inferred(axes(A, Axis{:x}())) == Axis{:x}(.1:.1:.2)
125125
@test @inferred(axes(A, Axis{:y})) == @inferred(axes(A, Axis{:y}())) == Axis{:y}(1//10:1//10:3//10)
126126
@test @inferred(axes(A, Axis{:z})) == @inferred(axes(A, Axis{:z}())) == Axis{:z}(["a", "b", "c", "d"])
127+
@test axes(A, 2) == Axis{:y}(1//10:1//10:3//10)
127128

128129
@test Axis{:col}(1) == Axis{:col}(1)
129130
@test Axis{:col}(1) != Axis{:com}(1)
@@ -140,6 +141,8 @@ A = AxisArray(reshape(1:24, 2,3,4),
140141
@test indices(Axis{:row}(2:7)) === (Base.OneTo(6),)
141142
@test indices(Axis{:row}(-1:1), 1) === Base.OneTo(3)
142143
@test length(Axis{:col}(-1:2)) === 4
144+
@test AxisArrays.axisname(Axis{:foo}(1:2)) == :foo
145+
@test AxisArrays.axisname(Axis{:foo}) == :foo
143146

144147
# Test Timetype axis construction
145148
dt, vals = DateTime(2010, 1, 2, 3, 40), randn(5,2)

0 commit comments

Comments
 (0)