Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Sep 26, 2024
1 parent c3c13fc commit 9ff2bb9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/varname.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ end

@testset "roundtrip conversion to/from string" begin
y = ones(10)
z = ones(5, 2)
vns = [
@varname(x),
@varname(ä),
Expand All @@ -160,6 +161,14 @@ end
@varname(y[end]),
@varname(y[:], false),
@varname(y[:], true),
@varname(z[:], false),
@varname(z[:], true),
@varname(z[:][:], false),
@varname(z[:][:], true),
@varname(z[:,:], false),
@varname(z[:,:], true),
@varname(z[2:5,:], false),
@varname(z[2:5,:], true),
]
for vn in vns
@test vn_from_string2(vn_to_string2(vn)) == vn
Expand Down

0 comments on commit 9ff2bb9

Please sign in to comment.