Skip to content

Commit

Permalink
Add test for indirect updating
Browse files Browse the repository at this point in the history
  • Loading branch information
korenmiklos committed Aug 17, 2024
1 parent ca3d1ef commit c18426b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ mult(x, y) = x * y
@test (@get y) == 11
end

@testset "Indirect updating" begin
@target a = 1
@target b = add1(a)
@target c = add1(b)
@test (@get c) == 3

@target a = 2
@test (@get c) == 4
end

@testset "Function modification" begin
@target m = 3
@target n = 4
Expand Down

0 comments on commit c18426b

Please sign in to comment.