From efd2554b49e181279dcfaf792a3cbfff9f466334 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Wed, 8 Sep 2021 11:49:52 +0200
Subject: [PATCH] Fix
 tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod

A bug was introduced in 440a0e460bd26a1b773ed3876d430dffb60fe620, erroneously
changing the name of the baseline for a comparison.

The bug was left unnoticed with recent versions of MATLAB and on Octave,
because the first array in the ensuing comparison had zero line, and because of
automatic broadcasting, the error message was not triggered.

However, the bug was exposed on MATLAB < R2016b.

(cherry picked from commit 8d4f5fbd9b18ca3eb2c6cead5af11007472286d1)
---
 .../multiple_lead_lags/sim_endo_lead_lag.mod                  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod b/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod
index eedbad7021..2a86e0db6a 100644
--- a/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod
+++ b/tests/deterministic_simulations/multiple_lead_lags/sim_endo_lead_lag.mod
@@ -58,8 +58,8 @@ if max(abs(base_results.oo_.exo_simul(1:end-base_results.M_.maximum_lead-base_re
 end
 
 clear base_results;
-base_results_aux_vars=load(['sim_exo_lead_lag_aux_vars' filesep 'Output' filesep 'sim_exo_lead_lag_aux_vars_results.mat']);
+base_results_aux_vars=load(['sim_endo_lead_lag_aux_vars' filesep 'Output' filesep 'sim_endo_lead_lag_aux_vars_results.mat']);
 if max(abs(base_results_aux_vars.oo_.endo_simul(strmatch('z_backward_lag_2',base_results_aux_vars.M_.endo_names,'exact'),1:end-base_results_aux_vars.M_.maximum_lead) -...
     oo_.endo_simul(strmatch('AUX_ENDO_LAG_2_2',M_.endo_names,'exact'),1:end-M_.maximum_lag)))>1e-8 
     error('Translation of endogenous variables is wrong')
-end
\ No newline at end of file
+end
-- 
GitLab