Skip to content

Commit

Permalink
add tests for set
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxd3 committed Apr 7, 2024
1 parent eda1a8f commit 02aabdb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/varname.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ end
x = (a = [1.0 2.0; 3.0 4.0; 5.0 6.0], b = 1.0);
@test get(x, @varname(a[1, 2])) == 2.0
@test get(x, @varname(b)) == 1.0
@test set(x, @varname(a[1, 2]), 10) == (a = [1.0 10.0; 3.0 4.0; 5.0 6.0], b = 1.0)
@test set(x, @varname(b), 10) == (a = [1.0 2.0; 3.0 4.0; 5.0 6.0], b = 10.0)
end

@testset "subsumption with standard indexing" begin
Expand Down

0 comments on commit 02aabdb

Please sign in to comment.