comparison m-toolbox/classes/tests/@ltpda_test_runner/get_builtin_model_tests.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % GET_BUILTIN_MODEL_TESTS returns an array of test structures.
2 %
3 % The tests for the built-in model test classes are gathered in to an array
4 % of structures of the form:
5 %
6 % test.utp % instance of the unit test class
7 % test.methods % a cell-array of the methods to be run
8 %
9 % VERSION: $Id: get_builtin_model_tests.m,v 1.3 2011/02/23 15:13:45 hewitson Exp $
10 %
11 function tests = get_builtin_model_tests(runner)
12
13 tests = [];
14 % Run all tests in built-in models dirs <models>/tests
15 paths = utils.models.getBuiltinModelSearchPaths();
16
17 for kk=1:numel(paths)
18 path = fullfile(paths{kk}, 'tests');
19 tests = [tests runner.get_tests_in_dir(path)];
20 end
21
22 % and add the new extension modules built-in models and class tests
23 prefs = getappdata(0, 'LTPDApreferences');
24 searchPaths = prefs.getExtensionsPrefs.getSearchPaths;
25 for kk=0:searchPaths.size-1
26 path = fullfile(char(searchPaths.get(kk)), 'tests');
27 tests = [tests runner.get_tests_in_dir(path)];
28 end
29
30 end