Skip to content

Commit

Permalink
add classify tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cossio committed May 9, 2020
1 parent ec0e609 commit 1e6e20d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/classify.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using OneHot, Test, Random

@testset "classify" begin
A = randn(5,5,4)
cl = OneHot.classify(A)
for I in CartesianIndices(cl)
@test maximum(A[:,I]) == A[cl[I],I]
end
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ using SafeTestsets

@safetestset "util" begin include("util.jl") end
@safetestset "onehot" begin include("onehot.jl") end
@safetestset "classify" begin include("classify.jl") end

2 comments on commit 1e6e20d

@cossio
Copy link
Owner

@cossio cossio commented on 1e6e20d May 9, 2020

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 updated: JuliaRegistries/General/14441

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.1.0 -m "<description of version>" 1e6e20d995d97c942253252f05aee8e3af0c77da
git push origin v0.1.0

Please sign in to comment.