From 4a33aad62b5994ccd3903811b23419b18598f2eb Mon Sep 17 00:00:00 2001
From: sebastien <sebastien@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Mon, 14 Dec 2009 11:12:02 +0000
Subject: [PATCH] k-order tests: when something is wrong, use error() instead
 of disp(), so that the testsuite stops

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3237 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 tests/k_order_perturbation/fs2000k2.mod  | 12 ++++++------
 tests/k_order_perturbation/fs2000k3.mod  |  8 ++++----
 tests/k_order_perturbation/fs2000k_1.mod | 12 ++++++------
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/tests/k_order_perturbation/fs2000k2.mod b/tests/k_order_perturbation/fs2000k2.mod
index 9937be46b9..a1997539f0 100644
--- a/tests/k_order_perturbation/fs2000k2.mod
+++ b/tests/k_order_perturbation/fs2000k2.mod
@@ -67,21 +67,21 @@ dr0 = oo1.oo_.dr;
 dr = oo_.dr;
 
 if max(max(abs(dr0.ghx - dr.ghx))) > 1e-12;
-   disp('error in ghx');
+   error('error in ghx');
 end;
 if max(max(abs(dr0.ghu - dr.ghu))) > 1e-12;
-   disp('error in ghu');
+   error('error in ghu');
 end;
 if max(max(abs(dr0.ghxx - dr.ghxx))) > 1e-12;
-   disp('error in ghxx');
+   error('error in ghxx');
 end;
 if max(max(abs(dr0.ghuu - dr.ghuu))) > 1e-12;
-   disp('error in ghuu');
+   error('error in ghuu');
 end;
 if max(max(abs(dr0.ghxu - dr.ghxu))) > 1e-12;
-   disp('error in ghxu');
+   error('error in ghxu');
 end;
 if max(max(abs(dr0.ghs2 - dr.ghs2))) > 1e-12;
-   disp('error in ghs2');
+   error('error in ghs2');
 end;
 
diff --git a/tests/k_order_perturbation/fs2000k3.mod b/tests/k_order_perturbation/fs2000k3.mod
index 36efd98f3d..a5cab25a1d 100644
--- a/tests/k_order_perturbation/fs2000k3.mod
+++ b/tests/k_order_perturbation/fs2000k3.mod
@@ -66,15 +66,15 @@ dr0 = oo1.oo_.dr;
 dr = oo_.dr;
 
 if max(max(abs(dr0.ghxx - dr.ghxx))) > 1e-12;
-   disp('error in ghxx');
+   error('error in ghxx');
 end;
 if max(max(abs(dr0.ghuu - dr.ghuu))) > 1e-12;
-   disp('error in ghuu');
+   error('error in ghuu');
 end;
 if max(max(abs(dr0.ghxu - dr.ghxu))) > 1e-12;
-   disp('error in ghxu');
+   error('error in ghxu');
 end;
 if max(max(abs(dr0.ghs2 - dr.ghs2))) > 1e-12;
-   disp('error in ghs2');
+   error('error in ghs2');
 end;
 
diff --git a/tests/k_order_perturbation/fs2000k_1.mod b/tests/k_order_perturbation/fs2000k_1.mod
index c9e8bb036c..be201aebc3 100644
--- a/tests/k_order_perturbation/fs2000k_1.mod
+++ b/tests/k_order_perturbation/fs2000k_1.mod
@@ -78,21 +78,21 @@ ikc2 = [1 3 4 2 9 11 12 10 13 15 16 14 5 7 8 6];
 ikc2u = [1 2 5 6 7 8 3 4];
 
 if max(max(abs(dr0.ghx - dr.ghx(ikr,ikc)))) > 1e-12;
-   disp('error in ghx');
+   error('error in ghx');
 end;
 if max(max(abs(dr0.ghu - dr.ghu(ikr,:)))) > 1e-12;
-   disp('error in ghu');
+   error('error in ghu');
 end;
 if max(max(abs(dr0.ghxx - dr.ghxx(ikr,ikc2)))) > 1e-12;
-   disp('error in ghxx');
+   error('error in ghxx');
 end;
 if max(max(abs(dr0.ghuu - dr.ghuu(ikr,:)))) > 1e-12;
-   disp('error in ghuu');
+   error('error in ghuu');
 end;
 if max(max(abs(dr0.ghxu - dr.ghxu(ikr,ikc2u)))) > 1e-12;
-   disp('error in ghxu');
+   error('error in ghxu');
 end;
 if max(max(abs(dr0.ghs2 - dr.ghs2(ikr,:)))) > 1e-12;
-   disp('error in ghs2');
+   error('error in ghs2');
 end;
 
-- 
GitLab