11991
|
1 % test_netcdf |
|
2 % Test the netcdf interface |
|
3 |
11985
|
4 function test_netcdf() |
|
5 |
11909
|
6 import_netcdf |
|
7 |
11988
|
8 tests = {'test_netcdf_constant',... |
|
9 'test_netcdf_create'... |
|
10 'test_netcdf_low_level_interface'... |
12498
|
11 'test_netcdf_unlim',... |
12711
|
12 'test_netcdf_datatypes',... |
|
13 'test_netcdf_scalar_variable',... |
|
14 'test_netcdf_attributes',... |
|
15 'test_netcdf_high_level_interface',... |
|
16 'test_netcdf_ncwriteschema',... |
|
17 'test_netcdf_ncwriteschema_unlim',... |
|
18 'test_netcdf_ncwriteschema_chunking',... |
11988
|
19 'test_netcdf_ncwriteschema_group'... |
|
20 }; |
|
21 |
11990
|
22 maxlen = max(cellfun(@(s) length(s),tests)); |
|
23 |
11989
|
24 libver = netcdf.inqLibVers(); |
|
25 fprintf('Using NetCDF library version "%s"\n',libver) |
|
26 |
11988
|
27 for iindex=1:length(tests); |
|
28 |
11990
|
29 dots = repmat('.',1,maxlen - length(tests{iindex})); |
|
30 fprintf('run %s%s ',tests{iindex},dots); |
11988
|
31 try |
|
32 eval(tests{iindex}); |
|
33 disp(' OK '); |
|
34 catch |
|
35 disp(' FAIL '); |
|
36 disp(lasterr) |
|
37 end |
|
38 end |
|
39 |
11991
|
40 %% Copyright (C) 2013 Alexander Barth |
|
41 %% |
|
42 %% This program is free software; you can redistribute it and/or modify |
|
43 %% it under the terms of the GNU General Public License as published by |
|
44 %% the Free Software Foundation; either version 2 of the License, or |
|
45 %% (at your option) any later version. |
|
46 %% |
|
47 %% This program is distributed in the hope that it will be useful, |
|
48 %% but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
49 %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
50 %% GNU General Public License for more details. |
|
51 %% |
|
52 %% You should have received a copy of the GNU General Public License |
|
53 %% along with this program; If not, see <http://www.gnu.org/licenses/>. |
11985
|
54 |
11909
|
55 |
11985
|
56 |
11991
|
57 |