Skip to content

Commit e45b215

Browse files
author
Miha Zgubic
committed
move convert tests
1 parent 0ae31ae commit e45b215

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

test/deprecated.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,10 @@ end
3636

3737
@testset "Deprecated: Inplacable Thunk argument order" begin
3838
@test (@test_deprecated InplaceableThunk(@thunk([1]), x->x.+=1)) isa InplaceableThunk
39-
end
39+
end
40+
41+
@testset "Deprecated: convert from Tangent" begin
42+
@test convert(NamedTuple, Tangent{Foo}(x=2.5)) == (; x=2.5)
43+
@test convert(Tuple, Tangent{Tuple{Float64,}}(2.0)) == (2.0,)
44+
@test convert(Dict, Tangent{Dict}(Dict(4 => 3))) == Dict(4 => 3)
45+
end

test/differentials/composite.jl

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ end
2222
@testset "empty types" begin
2323
@test typeof(Tangent{Tuple{}}()) == Tangent{Tuple{}, Tuple{}}
2424
end
25-
@testset "convert" begin
26-
@test convert(NamedTuple, Tangent{Foo}(x=2.5)) == (; x=2.5)
27-
@test convert(Tuple, Tangent{Tuple{Float64,}}(2.0)) == (2.0,)
28-
@test convert(Dict, Tangent{Dict}(Dict(4 => 3))) == Dict(4 => 3)
29-
end
3025

3126
@testset "==" begin
3227
@test Tangent{Foo}(x=0.1, y=2.5) == Tangent{Foo}(x=0.1, y=2.5)

0 commit comments

Comments
 (0)