Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cjprybol committed Nov 1, 2017
1 parent f3389f9 commit 5609c48
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/13_arraycommon.jl
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,14 @@ end
@test levels(dest) == levels(src) == reverse(v)
end

@testset "TODO" begin
# test what happens when non-nullable element-types aren't equal
# I think it will default to a Base.copy! fxn

# test what happens when we view a subset of the CategoricalArray
# fix currently just calls viewarray.parent.refs & viewarray.parent.pool which isn't subset properly,
# so I think there are still issues to solve due to that
@testset "copy a view-ed subset of src into dest" begin
v = ["a", "b", "c"]
src = levels!(CategoricalVector(v), reverse(v))
vsrc = view(src, 1:2)
dest = CategoricalVector{String}(3)
copy!(dest, vsrc)
@test dest[1:2] == src[1:2]
@test levels(dest) == levels(src)
end
end

Expand Down

0 comments on commit 5609c48

Please sign in to comment.