|
10 | 10 | % TESTPROPERTY % Tests for the nix.Property object
|
11 | 11 |
|
12 | 12 | funcs = {};
|
13 |
| - funcs{end+1} = @test_attrs; |
14 |
| - funcs{end+1} = @test_update_values; |
15 |
| - funcs{end+1} = @test_values; |
16 |
| - funcs{end+1} = @test_value_count; |
17 |
| - funcs{end+1} = @test_values_delete; |
18 |
| - funcs{end+1} = @test_property_compare; |
| 13 | + funcs{end+1} = @testAttributes; |
| 14 | + funcs{end+1} = @testUpdateValues; |
| 15 | + funcs{end+1} = @testValues; |
| 16 | + funcs{end+1} = @testValueCount; |
| 17 | + funcs{end+1} = @testDeleteValues; |
| 18 | + funcs{end+1} = @testCompare; |
19 | 19 | end
|
20 | 20 |
|
21 | 21 | %% Test: Access Attributes
|
22 |
| -function [] = test_attrs( varargin ) |
| 22 | +function [] = testAttributes( varargin ) |
23 | 23 | f = nix.File(fullfile(pwd, 'tests', 'testRW.h5'), nix.FileMode.Overwrite);
|
24 | 24 | s = f.createSection('testSectionProperty', 'nixSection');
|
25 | 25 | p = s.createProperty('testProperty1', nix.DataType.String);
|
|
46 | 46 | end
|
47 | 47 |
|
48 | 48 | %% Test: Access values
|
49 |
| -function [] = test_values( varargin ) |
| 49 | +function [] = testValues( varargin ) |
50 | 50 | f = nix.File(fullfile(pwd,'tests','testRW.h5'), nix.FileMode.Overwrite);
|
51 | 51 | s = f.createSection('mainSection', 'nixSection');
|
52 | 52 | currProp = s.createPropertyWithValue('booleanProperty', {true, false, true});
|
|
57 | 57 | end
|
58 | 58 |
|
59 | 59 | %% Test: Update values and uncertainty
|
60 |
| -function [] = test_update_values( varargin ) |
| 60 | +function [] = testUpdateValues( varargin ) |
61 | 61 | f = nix.File(fullfile(pwd,'tests','testRW.h5'), nix.FileMode.Overwrite);
|
62 | 62 | s = f.createSection('mainSection', 'nixSection');
|
63 | 63 |
|
|
108 | 108 | end
|
109 | 109 |
|
110 | 110 | %% Test: Value count
|
111 |
| -function [] = test_value_count( varargin ) |
| 111 | +function [] = testValueCount( varargin ) |
112 | 112 | testFile = fullfile(pwd, 'tests', 'testRW.h5');
|
113 | 113 | f = nix.File(testFile, nix.FileMode.Overwrite);
|
114 | 114 | s = f.createSection('testSection', 'nixSection');
|
115 | 115 | p = s.createPropertyWithValue('booleanProperty', {true, false, true});
|
116 | 116 |
|
117 |
| - assert(p.value_count() == 3); |
| 117 | + assert(p.valueCount() == 3); |
118 | 118 | p.values = {};
|
119 |
| - assert(p.value_count() == 0); |
| 119 | + assert(p.valueCount() == 0); |
120 | 120 | p.values = {false};
|
121 | 121 |
|
122 | 122 | clear p s f;
|
123 | 123 | f = nix.File(testFile, nix.FileMode.ReadOnly);
|
124 |
| - assert(f.sections{1}.properties{1}.value_count() == 1); |
| 124 | + assert(f.sections{1}.properties{1}.valueCount() == 1); |
125 | 125 | end
|
126 | 126 |
|
127 | 127 | %% Test: Delete values
|
128 |
| -function [] = test_values_delete( varargin ) |
| 128 | +function [] = testDeleteValues( varargin ) |
129 | 129 | testFile = fullfile(pwd,'tests','testRW.h5');
|
130 | 130 | f = nix.File(testFile, nix.FileMode.Overwrite);
|
131 | 131 | s = f.createSection('testSection', 'nixSection');
|
132 | 132 |
|
133 | 133 | p = s.createPropertyWithValue('property1', {true, false, true});
|
134 | 134 | assert(~isempty(p.values));
|
135 |
| - p.values_delete(); |
| 135 | + p.deleteValues(); |
136 | 136 | assert(isempty(p.values));
|
137 | 137 |
|
138 | 138 | clear p s f;
|
|
141 | 141 | end
|
142 | 142 |
|
143 | 143 | %% Test: Compare properties
|
144 |
| -function [] = test_property_compare( varargin ) |
| 144 | +function [] = testCompare( varargin ) |
145 | 145 | testFile = fullfile(pwd, 'tests', 'testRW.h5');
|
146 | 146 | f = nix.File(testFile, nix.FileMode.Overwrite);
|
147 | 147 | s1 = f.createSection('testSection1', 'nixSection');
|
|
0 commit comments