annotate main/netcdf/inst/test_netcdf.m @ 12711:a4de85b2e6a0 octave-forge

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