|
67 | 67 |
|
68 | 68 | @testset "Base" begin
|
69 | 69 | # Test Base functions:
|
70 |
| - # string, Symbol, ==, hash, in, keys, haskey, isempty, push!!, empty!!, |
| 70 | + # in, keys, haskey, isempty, push!!, empty!!, |
71 | 71 | # getindex, setindex!, getproperty, setproperty!
|
72 |
| - csym = gensym() |
73 |
| - vn1 = @varname x[1][2] |
74 |
| - @test string(vn1) == "x[1][2]" |
75 |
| - @test Symbol(vn1) == Symbol("x[1][2]") |
76 |
| - |
77 |
| - vn2 = @varname x[1][2] |
78 |
| - @test vn2 == vn1 |
79 |
| - @test hash(vn2) == hash(vn1) |
80 | 72 |
|
81 | 73 | function test_base(vi_original)
|
82 | 74 | vi = deepcopy(vi_original)
|
@@ -289,14 +281,14 @@ end
|
289 | 281 | @testset "setval! & setval_and_resample!" begin
|
290 | 282 | @model function testmodel(x)
|
291 | 283 | n = length(x)
|
292 |
| - s ~ truncated(Normal(), 0, Inf) |
| 284 | + s ~ truncated(Normal(); lower=0) |
293 | 285 | m ~ MvNormal(zeros(n), I)
|
294 | 286 | return x ~ MvNormal(m, s^2 * I)
|
295 | 287 | end
|
296 | 288 |
|
297 | 289 | @model function testmodel_univariate(x, ::Type{TV}=Vector{Float64}) where {TV}
|
298 | 290 | n = length(x)
|
299 |
| - s ~ truncated(Normal(), 0, Inf) |
| 291 | + s ~ truncated(Normal(); lower=0) |
300 | 292 |
|
301 | 293 | m = TV(undef, n)
|
302 | 294 | for i in eachindex(m)
|
@@ -561,10 +553,10 @@ end
|
561 | 553 | end
|
562 | 554 |
|
563 | 555 | @testset "istrans" begin
|
564 |
| - @model demo_constrained() = x ~ truncated(Normal(), 0, Inf) |
| 556 | + @model demo_constrained() = x ~ truncated(Normal(); lower=0) |
565 | 557 | model = demo_constrained()
|
566 | 558 | vn = @varname(x)
|
567 |
| - dist = truncated(Normal(), 0, Inf) |
| 559 | + dist = truncated(Normal(); lower=0) |
568 | 560 |
|
569 | 561 | ### `VarInfo`
|
570 | 562 | # Need to run once since we can't specify that we want to _sample_
|
|
0 commit comments