Mercurial > repos > public > sbplib
annotate runtestsAll.m @ 577:e45c9b56d50d feature/grids
Add an Empty grid class
The need turned up for the flexural code when we may or may not have a grid for the open water and want to plot that solution.
In case there is no open water we need an empty grid to plot the empty gridfunction against to avoid errors.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 07 Sep 2017 09:16:12 +0200 |
parents | cd571e8ec1fd |
children | 3230e4cbdbb4 |
rev | line source |
---|---|
138
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
1 function res = runtestsAll() |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
2 l = dir(); |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
3 |
455
cd571e8ec1fd
Add function to run checkcode on all matlab files
Jonatan Werpers <jonatan@werpers.com>
parents:
138
diff
changeset
|
4 warning('Simplify using the ''what'' command') |
cd571e8ec1fd
Add function to run checkcode on all matlab files
Jonatan Werpers <jonatan@werpers.com>
parents:
138
diff
changeset
|
5 |
138
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
6 dirNames = {l([l.isdir]).name}; |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
7 |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
8 packages = {}; |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
9 for i = 1:length(dirNames) |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
10 if dirNames{i}(1) == '+' |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
11 packages{end+1} = dirNames{i}(2:end); |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
12 end |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
13 end |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
14 |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
15 rootSuite = matlab.unittest.TestSuite.fromFolder(pwd); |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
16 packageSuites = {}; |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
17 for i = 1:length(packages) |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
18 packageSuites{i} = matlab.unittest.TestSuite.fromPackage(packages{i}); |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
19 end |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
20 |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
21 ts = [rootSuite, packageSuites{:}]; |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
22 |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
23 res = ts.run(); |
344bde2f9d9b
Added a function to run all tests in a folder including all tests in subpackages.
Jonatan Werpers <jonatan@werpers.com>
parents:
diff
changeset
|
24 end |