From 0da0bcb622cdb567237be6377ecbca4401ba0eb3 Mon Sep 17 00:00:00 2001 From: Peter <46059512+petershintech@users.noreply.github.com> Date: Fri, 22 Jan 2021 03:07:52 +1100 Subject: [PATCH] dirname(@__FILE__) can be replaced with @__DIR__ (#1181) --- test/matrixvariates.jl | 2 +- test/truncate.jl | 2 +- test/univariates.jl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/matrixvariates.jl b/test/matrixvariates.jl index 4953cff67..9c04c399f 100644 --- a/test/matrixvariates.jl +++ b/test/matrixvariates.jl @@ -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 diff --git a/test/truncate.jl b/test/truncate.jl index 360379875..363af62e5 100644 --- a/test/truncate.jl +++ b/test/truncate.jl @@ -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 diff --git a/test/univariates.jl b/test/univariates.jl index 87ee32b4b..8913b3866 100644 --- a/test/univariates.jl +++ b/test/univariates.jl @@ -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