Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Miha Zgubic committed Mar 23, 2021
1 parent 0e63d38 commit ada3d02
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test/lib/lib.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@testset "lib.jl" begin
@testset "accum" begin
t1 = (a=1, b=2, c=3)
t2 = (a=1, b=2)
@test Zygote.accum(t1, t2) == (a = 2, b = 4, c = 3)
@test_throws ArgumentError Zygote.accum(t2, t1)
end
end
3 changes: 2 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ end
include("utils.jl")
end

@testset "lib/number" begin
@testset "lib" begin
include("lib/number.jl")
include("lib/lib.jl")
end

@testset "Features" begin
Expand Down

0 comments on commit ada3d02

Please sign in to comment.