|
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)
|
@@ -179,14 +171,14 @@ end
|
179 | 171 | @testset "setval! & setval_and_resample!" begin
|
180 | 172 | @model function testmodel(x)
|
181 | 173 | n = length(x)
|
182 |
| - s ~ truncated(Normal(), 0, Inf) |
| 174 | + s ~ truncated(Normal(); lower=0) |
183 | 175 | m ~ MvNormal(zeros(n), I)
|
184 | 176 | return x ~ MvNormal(m, s^2 * I)
|
185 | 177 | end
|
186 | 178 |
|
187 | 179 | @model function testmodel_univariate(x, ::Type{TV}=Vector{Float64}) where {TV}
|
188 | 180 | n = length(x)
|
189 |
| - s ~ truncated(Normal(), 0, Inf) |
| 181 | + s ~ truncated(Normal(); lower=0) |
190 | 182 |
|
191 | 183 | m = TV(undef, n)
|
192 | 184 | for i in eachindex(m)
|
@@ -444,10 +436,10 @@ end
|
444 | 436 | end
|
445 | 437 |
|
446 | 438 | @testset "istrans" begin
|
447 |
| - @model demo_constrained() = x ~ truncated(Normal(), 0, Inf) |
| 439 | + @model demo_constrained() = x ~ truncated(Normal(); lower=0) |
448 | 440 | model = demo_constrained()
|
449 | 441 | vn = @varname(x)
|
450 |
| - dist = truncated(Normal(), 0, Inf) |
| 442 | + dist = truncated(Normal(); lower=0) |
451 | 443 |
|
452 | 444 | ### `VarInfo`
|
453 | 445 | # Need to run once since we can't specify that we want to _sample_
|
|
0 commit comments