@@ -498,29 +498,24 @@ priors = 0 # See "new grammar" test.
498
498
end
499
499
@testset " var name splitting" begin
500
500
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) == :(())
504
503
505
504
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 )))
509
507
510
508
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 , :)))
514
511
515
512
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 )))
519
515
520
516
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 ])))
524
519
end
525
520
@testset " user-defined variable name" begin
526
521
@model f1 () = begin
@@ -529,8 +524,8 @@ priors = 0 # See "new grammar" test.
529
524
@model f2 () = begin
530
525
x ~ NamedDist (Normal (), @varname (y[2 ][:,1 ]))
531
526
end
532
- @model f3 () = begin
533
- x ~ NamedDist (Normal (), @varname (y[1 ]))
527
+ @model f3 () = begin
528
+ x ~ NamedDist (Normal (), @varname (y[1 ]))
534
529
end
535
530
vi1 = VarInfo (f1 ())
536
531
vi2 = VarInfo (f2 ())
0 commit comments