Skip to content

Commit ee35f43

Browse files
committed
tests: update set dimension test
1 parent d3219c8 commit ee35f43

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

tests/TestDimensions.m

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,24 @@
2323
assert(strcmp(d1.labels{1}, 'foo'));
2424
assert(strcmp(d1.labels{2}, 'bar'));
2525

26-
% fix this in NIX
27-
%d1.labels = {};
28-
%assert(isempty(d1.labels));
26+
d1.labels = {};
27+
assert(isempty(d1.labels));
28+
29+
try
30+
d1.labels = 'mV';
31+
catch ME
32+
assert(strcmp(ME.identifier, 'MATLAB:class:SetProhibited'));
33+
end;
34+
try
35+
d1.labels = ['mV', 'uA'];
36+
catch ME
37+
assert(strcmp(ME.identifier, 'MATLAB:class:SetProhibited'));
38+
end;
39+
try
40+
d1.labels = 1;
41+
catch ME
42+
assert(strcmp(ME.identifier, 'MATLAB:class:SetProhibited'));
43+
end;
2944
end
3045

3146
function [] = test_sample_dimension( varargin )

0 commit comments

Comments
 (0)