Skip to content

Commit

Permalink
dirname(@__FILE__) can be replaced with @__DIR__ (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
petershintech authored Jan 21, 2021
1 parent cff479e commit 0da0bcb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/matrixvariates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ function unpack_matvar_json_dict(dist::Type{<:MatrixDistribution}, dict)
end

function test_against_stan(dist::Type{<:MatrixDistribution})
filename = joinpath(dirname(@__FILE__), "ref", "matrixvariates", "jsonfiles", "$(dist)_stan_output.json")
filename = joinpath(@__DIR__, "ref", "matrixvariates", "jsonfiles", "$(dist)_stan_output.json")
stan_output = JSON.parsefile(filename)
K = length(stan_output)
for k in 1:K
Expand Down
2 changes: 1 addition & 1 deletion test/truncate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ for c in ["discrete",
title = string(uppercase(c[1]), c[2:end])
println(" [$title]")
println(" ------------")
jsonfile = joinpath(dirname(@__FILE__), "ref", "$(c)_test.ref.json")
jsonfile = joinpath(@__DIR__, "ref", "$(c)_test.ref.json")
verify_and_test_drive(jsonfile, ARGS, 10^6,3,5)
println()
end
Expand Down
2 changes: 1 addition & 1 deletion test/univariates.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ for c in ["discrete",
title = string(uppercase(c[1]), c[2:end])
println(" [$title]")
println(" ------------")
jsonfile = joinpath(dirname(@__FILE__), "ref", "$(c)_test.ref.json")
jsonfile = joinpath(@__DIR__, "ref", "$(c)_test.ref.json")
verify_and_test_drive(jsonfile, ARGS, 10^6)
println()
end

0 comments on commit 0da0bcb

Please sign in to comment.