Skip to content

Commit

Permalink
Get tests to pass on 1.6 (again...)
Browse files Browse the repository at this point in the history
  • Loading branch information
s-broda committed Sep 10, 2020
1 parent d536a79 commit 59531c0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ end
Random.seed!(1)
spec = TGARCH{1,1,1}([1., .05, .9, .01]);
str = sprint(show, spec)
@test startswith(str, "TGARCH{1,1,1} specification.\n\n─────────────────────────────────\n ω γ₁ β₁ α₁\n─────────────────────────────────\nParameters: 1.0 0.05 0.9 0.01\n─────────────────────────────────\n")
if VERSION < v"1.5.5"
@test startswith(str, "TGARCH{1,1,1} specification.\n\n─────────────────────────────────\n ω γ₁ β₁ α₁\n─────────────────────────────────\nParameters: 1.0 0.05 0.9 0.01\n─────────────────────────────────\n")
else
@test startswith(str, "TGARCH{1, 1, 1} specification.\n\n─────────────────────────────────\n ω γ₁ β₁ α₁\n─────────────────────────────────\nParameters: 1.0 0.05 0.9 0.01\n─────────────────────────────────\n")
end
am = simulate(spec, T);
am = selectmodel(TGARCH, am.data; meanspec=NoIntercept(), show_trace=true, maxlags=2)
@test all(isapprox.(coef(am), [0.9439667311150648
Expand Down Expand Up @@ -67,7 +71,7 @@ end
if VERSION < v"1.5.5"
@test startswith(str, "\nTGARCH{0,1,1}")
else
@test startswith(str, "\nGARCH{1,1}")
@test startswith(str, "\nGARCH{1, 1}")
end
fit!(am2)
@test isfitted(am2) == true
Expand All @@ -76,7 +80,7 @@ end
if VERSION < v"1.5.5"
@test startswith(str, "\nTGARCH{0,1,1}")
else
@test startswith(str, "\nGARCH{1,1}")
@test startswith(str, "\nGARCH{1, 1}")
end
am3 = fit(am2)
@test isfitted(am3) == true
Expand Down

0 comments on commit 59531c0

Please sign in to comment.