Fix integration tests.

print_equations() has been replaced by search().
silicon
Stéphane Adjemian (Ryûk) 2023-03-06 17:17:31 +01:00
parent cae7feeefb
commit cc0d22cf4c
Signed by: stepan
GPG Key ID: 295C1FE89E17EB3C
3 changed files with 6 additions and 36 deletions

View File

@ -109,13 +109,8 @@ pac.estimate.iterative_ols('zpac', eparams, edata, 2005Q1:2000Q1+200);
pac.print('pacman','zpac');
// Print equations where the variable appears in
fprintf('x1bar is in: \n')
print_equations('x1bar')
fprintf('\n')
fprintf('x2bar is in: \n')
print_equations('x2bar', true);
fprintf('\n')
search('x1bar')
search('x2bar', 'withparamvalues')
e_c_m_iterative_ols = M_.params(strmatch('e_c_m', M_.param_names, 'exact'));
c_z_1_iterative_ols = M_.params(strmatch('c_z_1', M_.param_names, 'exact'));

View File

@ -60,29 +60,9 @@ var_expectation.initialize('varexp')
var_expectation.update('varexp');
// Print equations where the variable appears in
fprintf('x is in: \n')
print_equations('x')
fprintf('\n')
fprintf('y is in: \n')
str = print_equations('y', true);
fprintf('\n')
search('x')
search('y', 'withparamvalues')
if ~isfield(M_.var_expectation.varexp, 'time_shift') || ~isequal(M_.var_expectation.varexp.time_shift, -2)
error('Preprocessor does not honour time_shift option as expected.')
end
str = strrep(str, 'foo = .5*foo(-1)', '');
str = strrep(str, '+ var_expectation_model_varexp_constant', '');
str = strrep(str, '+ var_expectation_model_varexp_x_0*x(-2)', '');
str = strrep(str, '+ var_expectation_model_varexp_y_0*y(-2)', '');
str = strrep(str, '+ var_expectation_model_varexp_z_0*z(-2)', '');
str = strrep(str, '+ var_expectation_model_varexp_x_1*x(-3)', '');
str = strrep(str, '+ var_expectation_model_varexp_y_1*y(-3)', '');
str = strrep(str, '+ var_expectation_model_varexp_z_1*z(-3)', '');
str = strrep(str, ';', '');
if ~isempty(strtrim(str))
error('Printed equation is wrong.')
end

View File

@ -58,13 +58,8 @@ var_expectation.initialize('varexp')
var_expectation.update('varexp');
// Print equations where the variable appears in
fprintf('x is in: \n')
print_equations('x')
fprintf('\n')
fprintf('y is in: \n')
print_equations('y', true)
fprintf('\n')
search('x')
search('y', 'withparamvalues')
/*
** REMARK The VAR model is such that x depends on past values of x