Skip to content

Commit 84819f1

Browse files
committed
Update suggested changes in compiler test
1 parent fa8c1c8 commit 84819f1

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

test/compiler.jl

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -498,29 +498,24 @@ priors = 0 # See "new grammar" test.
498498
end
499499
@testset "var name splitting" begin
500500
var_expr = :(x)
501-
sym, inds = vsym(var_expr), vinds(var_expr)
502-
@test sym == :(:x)
503-
@test inds == :(())
501+
@test vsym(var_expr) == :(:x)
502+
@test vinds(var_expr) == :(())
504503

505504
var_expr = :(x[1,1][2,3])
506-
sym, inds = vsym(var_expr), vinds(var_expr)
507-
@test sym == :(:x)
508-
@test inds == :(((1, 1), (2, 3)))
505+
@test vsym(var_expr) == :(:x)
506+
@test vinds(var_expr) == :(((1, 1), (2, 3)))
509507

510508
var_expr = :(x[:,1][2,:])
511-
sym, inds = vsym(var_expr), vinds(var_expr)
512-
@test sym == :(:x)
513-
@test inds == :(((:, 1), (2, :)))
509+
@test vsym(var_expr) == :(:x)
510+
@test vinds(var_expr) == :(((:, 1), (2, :)))
514511

515512
var_expr = :(x[2:3,1][2,1:2])
516-
sym, inds = vsym(var_expr), vinds(var_expr)
517-
@test sym == :(:x)
518-
@test inds == :(((2:3, 1), (2, 1:2)))
513+
@test vsym(var_expr) == :(:x)
514+
@test vinds(var_expr) == :(((2:3, 1), (2, 1:2)))
519515

520516
var_expr = :(x[2:3,2:3][[1,2],[1,2]])
521-
sym, inds = vsym(var_expr), vinds(var_expr)
522-
@test sym == :(:x)
523-
@test inds == :(((2:3, 2:3), ([1, 2], [1, 2])))
517+
@test vsym(var_expr) == :(:x)
518+
@test vinds(var_expr) == :(((2:3, 2:3), ([1, 2], [1, 2])))
524519
end
525520
@testset "user-defined variable name" begin
526521
@model f1() = begin
@@ -529,8 +524,8 @@ priors = 0 # See "new grammar" test.
529524
@model f2() = begin
530525
x ~ NamedDist(Normal(), @varname(y[2][:,1]))
531526
end
532-
@model f3() = begin
533-
x ~ NamedDist(Normal(), @varname(y[1]))
527+
@model f3() = begin
528+
x ~ NamedDist(Normal(), @varname(y[1]))
534529
end
535530
vi1 = VarInfo(f1())
536531
vi2 = VarInfo(f2())

0 commit comments

Comments
 (0)