From 85d3210159a0560069a842f182965399fd4e198b Mon Sep 17 00:00:00 2001
From: Michel Juillard <michel.juillard@ens.fr>
Date: Thu, 3 Nov 2011 11:14:37 +0100
Subject: [PATCH] correcting tests

---
 tests/Makefile.am                        | 3 ++-
 tests/kalman_filter_smoother/algo1.mod   | 4 ++--
 tests/kalman_filter_smoother/algo2.mod   | 2 +-
 tests/kalman_filter_smoother/algo3.mod   | 2 +-
 tests/kalman_filter_smoother/algo4.mod   | 2 +-
 tests/kalman_filter_smoother/algoH2.mod  | 6 +++---
 tests/kalman_filter_smoother/fs2000a.mod | 4 +---
 7 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index a5cb20495..c9091c5be 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -86,7 +86,8 @@ MODFILES = \
 	simul/example1.mod \
 	conditional_forecasts/fs2000_est.mod \
 	recursive/ls2003.mod \
-	recursive/ls2003_bayesian.mod
+	recursive/ls2003_bayesian.mod \
+	kalman_filter_smoother/gen_data.mod \
 	kalman_filter_smoother/algo1.mod \
 	kalman_filter_smoother/algo2.mod \
 	kalman_filter_smoother/algo3.mod \
diff --git a/tests/kalman_filter_smoother/algo1.mod b/tests/kalman_filter_smoother/algo1.mod
index 482240ba4..29e5b0203 100644
--- a/tests/kalman_filter_smoother/algo1.mod
+++ b/tests/kalman_filter_smoother/algo1.mod
@@ -32,7 +32,7 @@ end;
 
 varobs dw dx dy z;
        
-estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode);
+estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,filtered_vars);
 
 //checking smoother consistency
 X = oo_.SmoothedVariables;
@@ -47,7 +47,7 @@ for t=2:200;
 end;
 if max(max(abs(err))) > 1e-10;
    error('Test fails')
-endif;
+end;
 
 d=load('data');
 dat = [d.dw d.dx d.dy d.z];
diff --git a/tests/kalman_filter_smoother/algo2.mod b/tests/kalman_filter_smoother/algo2.mod
index d589792cd..0c54b4cee 100644
--- a/tests/kalman_filter_smoother/algo2.mod
+++ b/tests/kalman_filter_smoother/algo2.mod
@@ -32,7 +32,7 @@ end;
 
 varobs dw dx dy z;
        
-estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode,kalman_algo=2);
+estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo1_mode,kalman_algo=2,filtered_vars);
 
 //checking smoother consistency
 X = oo_.SmoothedVariables;
diff --git a/tests/kalman_filter_smoother/algo3.mod b/tests/kalman_filter_smoother/algo3.mod
index 78fff75e8..22f1ed5b3 100644
--- a/tests/kalman_filter_smoother/algo3.mod
+++ b/tests/kalman_filter_smoother/algo3.mod
@@ -35,7 +35,7 @@ end;
 
 varobs w x y;
        
-estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter);
+estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,diffuse_filter,filtered_vars);
 
 //checking smoother consistency
 X = oo_.SmoothedVariables;
diff --git a/tests/kalman_filter_smoother/algo4.mod b/tests/kalman_filter_smoother/algo4.mod
index 4e5276867..7ad9e208e 100644
--- a/tests/kalman_filter_smoother/algo4.mod
+++ b/tests/kalman_filter_smoother/algo4.mod
@@ -35,7 +35,7 @@ end;
 
 varobs w x y;
        
-estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter,kalman_algo=4);
+estimation(datafile=data,first_obs=1000,nobs=200,mh_replic=0,mode_compute=0,mode_file=algo3_mode,diffuse_filter,kalman_algo=4,filtered_vars);
 
 //checking smoother consistency
 X = oo_.SmoothedVariables;
diff --git a/tests/kalman_filter_smoother/algoH2.mod b/tests/kalman_filter_smoother/algoH2.mod
index 2fb7e81b8..1e7e00e20 100644
--- a/tests/kalman_filter_smoother/algoH2.mod
+++ b/tests/kalman_filter_smoother/algoH2.mod
@@ -57,7 +57,7 @@ X = oo_.SmoothedMeasurementErrors;
 ME = [X.dw X.dx X.dy X.z];
 if max(max(abs(dat(1000:1199,:)-S(:,[2:4 1])-ME))) > 1e-10;
    error('Test fails');
-end;
+end;    
 
 o1 = load('algoH1_results');
 obj_endo={'SmoothedVariables'; 'FilteredVariables'; 'UpdatedVariables'};
@@ -90,6 +90,6 @@ for i=1:nobj_exo;
     end;    
 end;
 
-if max(max(abs(o1.oo_.SmoothedMeasurementErrors.z - oo_.SmoothedMeasurementErrors.z))) > 1e-10;
+if max(max(abs(o1.oo_.SmoothedMeasurementErrors.z - oo_.SmoothedMeasurementErrors.z))) > 1e-10; 
    error('Test fails');
-end; 
+end;    
diff --git a/tests/kalman_filter_smoother/fs2000a.mod b/tests/kalman_filter_smoother/fs2000a.mod
index d0bda7c48..a2c241e94 100644
--- a/tests/kalman_filter_smoother/fs2000a.mod
+++ b/tests/kalman_filter_smoother/fs2000a.mod
@@ -55,9 +55,7 @@ var e_a; stderr 0.014;
 var e_m; stderr 0.005;
 end;
 
-unit_root_vars P_obs Y_obs;
-
-steady;
+steady(nocheck);
 
 check;
 
-- 
GitLab