From be3cc662f26b949936aa88d39f658480b09322f0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Charybdis=29?=
 <stephane.adjemian@univ-lemans.fr>
Date: Mon, 1 Dec 2014 17:11:53 +0100
Subject: [PATCH] Added initialization routine and missing routine.

To use this toolbox the src folder should be added to the Matlab's path
and the script src/initialize_unit_tests_toolbox should be executed (if
needed the missing subfolder will be added to the path).
---
 src/initialize_unit_tests_toolbox.m |  6 ++++++
 src/missing/isoctave/isoctave.m     | 20 ++++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 src/initialize_unit_tests_toolbox.m
 create mode 100644 src/missing/isoctave/isoctave.m

diff --git a/src/initialize_unit_tests_toolbox.m b/src/initialize_unit_tests_toolbox.m
new file mode 100644
index 0000000..e60cb11
--- /dev/null
+++ b/src/initialize_unit_tests_toolbox.m
@@ -0,0 +1,6 @@
+% Get the path to the dates/src folder.
+unit_tests_src_root = strrep(which('initialize_unit_tests_toolbox'),'initialize_unit_tests_toolbox.m','');
+
+if ~exist('isoctave','file') 
+    addpath([unit_tests_src_root '/missing/isoctave'])
+end
\ No newline at end of file
diff --git a/src/missing/isoctave/isoctave.m b/src/missing/isoctave/isoctave.m
new file mode 100644
index 0000000..5d5273f
--- /dev/null
+++ b/src/missing/isoctave/isoctave.m
@@ -0,0 +1,20 @@
+function l = isoctave()
+
+% Tests if Octave is used.
+    
+% Copyright (C) 2013-2014 Dynare Team
+%
+% This code is free software: you can redistribute it and/or modify
+% it under the terms of the GNU General Public License as published by
+% the Free Software Foundation, either version 3 of the License, or
+% (at your option) any later version.
+%
+% Dynare dates submodule is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
+
+l = exist('OCTAVE_VERSION');
\ No newline at end of file
-- 
GitLab