Verified Commit 5e0c4272 authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fix wrong logic in test introduced in ceb67c42.

parent ceb67c42
Pipeline #6206 failed with stages
in 85 minutes and 51 seconds
......@@ -93,17 +93,15 @@ end
expectationmodel = M_.(expectationmodelfield).(expectationmodelname);
% Get the name of the associated VAR model and test its existence.
if isfield(M_.(expectationmodelfield), 'auxiliary_model_type')
if ~isfield(M_.(expectationmodel.auxiliary_model_type), expectationmodel.auxiliary_model_name)
switch expectationmodelkind
case 'var'
error('Unknown VAR/TREND_COMPONENT model (%s) in VAR_EXPECTATION_MODEL (%s)!', expectationmodel.auxiliary_model_name, expectationmodelname)
case 'pac'
error('Unknown VAR/TREND_COMPONENT model (%s) in PAC_EXPECTATION_MODEL (%s)!', expectationmodel.auxiliary_model_name, expectationmodelname)
otherwise
end
if isfield(expectationmodel, 'auxiliary_model_name') && ~isfield(M_.(expectationmodel.auxiliary_model_type), expectationmodel.auxiliary_model_name)
switch expectationmodelkind
case 'var'
error('Unknown VAR/TREND_COMPONENT model (%s) in VAR_EXPECTATION_MODEL (%s)!', expectationmodel.auxiliary_model_name, expectationmodelname)
case 'pac'
error('Unknown VAR/TREND_COMPONENT model (%s) in PAC_EXPECTATION_MODEL (%s)!', expectationmodel.auxiliary_model_name, expectationmodelname)
otherwise
end
else
elseif isequal(expectationmodelkind, 'pac') && ~isfield(expectationmodel, 'auxiliary_model_name')
error('print method does not work in PAC/MCE.')
end
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment