Skip to content

Commit

Permalink
Remove code to skip mp_table tests (for previously missing subscripti…
Browse files Browse the repository at this point in the history
…ng functionality).
  • Loading branch information
rdzman committed Feb 13, 2024
1 parent 46356c3 commit be4aad7
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 173 deletions.
2 changes: 1 addition & 1 deletion lib/mpver.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
v{1} = struct( 'Name', 'MATPOWER', ...
'Version', '8.0b1+', ...
'Release', '', ...
'Date', '12-Feb-2024' );
'Date', '13-Feb-2024' );
if nargout > 0
if nargin > 0
rv = v{1};
Expand Down
299 changes: 127 additions & 172 deletions lib/t/t_mp_table.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
var_values = {var1, var2, var3, var4, var5, var6};
row_names = {'row1'; 'second row'; 'row 3'; 'fourth row'; '5'; '6th row'};
dim_names = {'records', 'fields'};
my_table_constructor = mp_table_class();

%% run tests
for k = 1:nc
Expand All @@ -60,8 +59,6 @@
have_feature('matlab') && have_feature('matlab', 'vnum') < 9.010;
skip_ml_tab2 = (isa(T, 'table') || isa(T, 'mp_table_subclass')) && ...
have_feature('matlab') && have_feature('matlab', 'vnum') < 9.012;
skip_mp_table = isa(T, 'mp_table') || (isa(T, 'mp_table_subclass') && isa(my_table_constructor(), 'mp_table'));
skip_mp_table = 0;
t_ok(isa(T, class_names{k}), [t 'class']);
t_ok(isempty(T), [t 'isempty']);

Expand Down Expand Up @@ -199,16 +196,12 @@
t_ok(isequal(T{:, 4:6}, [v4 v5 v6]), [t 'T{:, j1:jN}']);
t_ok(isequal(T{:, 2:2:6}, [v2 v4 v6]), [t 'T{:, j1:2:jN}']);

if skip_mp_table
t_skip(6, 'T{:, ''<name>''} : not yet implemented');
else
t_ok(isequal(T{:, 'igr'}, v1), [t 'T{:, ''igr''} == v1']);
t_ok(isequal(T{:, "flt"}, v2), [t 'T{:, "flt"} == v2']);
t_ok(isequal(T{:, 'str'}, v3), [t 'T{:, ''str''} == v3']);
t_ok(isequal(T{:, 'dbl'}, v4), [t 'T{:, ''dbl''} == v4']);
t_ok(isequal(T{:, 'boo'}, v5), [t 'T{:, ''boo''} == v5']);
t_ok(isequal(T{:, 'mat'}, v6), [t 'T{:, ''mat''} == v6']);
end
t_ok(isequal(T{:, 'igr'}, v1), [t 'T{:, ''igr''} == v1']);
t_ok(isequal(T{:, "flt"}, v2), [t 'T{:, "flt"} == v2']);
t_ok(isequal(T{:, 'str'}, v3), [t 'T{:, ''str''} == v3']);
t_ok(isequal(T{:, 'dbl'}, v4), [t 'T{:, ''dbl''} == v4']);
t_ok(isequal(T{:, 'boo'}, v5), [t 'T{:, ''boo''} == v5']);
t_ok(isequal(T{:, 'mat'}, v6), [t 'T{:, ''mat''} == v6']);

t_ok(isequal(T{2, 1}, v1(2)), [t 'T{i, j} == v<j>(i)']);
t_ok(isequal(T{4, 6}, v6(4, :)), [t 'T{i, j} == v<j>(i)']);
Expand All @@ -221,24 +214,17 @@
t_ok(isequal(T{6:-1:3, [2;4;6]}, [v2(6:-1:3) v4(6:-1:3) v6(6:-1:3, :)]), [t 'T{iN:-1:i1, jj}']);
t_ok(isequal(T{:, [4;1]}, [v4 v1]), [t 'T{:, jj} == [v<j1> v<j2> ...]']);
t_ok(isequal(T{:, [4;6;1]}, [v4 v6 v1]), [t 'T{:, jj} == [v<j1> v<j2> ...]']);
if skip_mp_table
t_skip(6, [t 'T{<*>, <str>} : not yet implemented']);
else
t_ok(isequal(T{2, 'igr'}, v1(2)), [t 'T{i, <str>} == v<j>(i)']);
t_ok(isequal(T{4, 'mat'}, v6(4, :)), [t 'T{i, <str>} == v<j>(i)']);
t_ok(isequal(T{1:3, 'flt'}, v2(1:3)), [t 'T{i1:iN, <str>} == v<j>(i1:iN)']);
t_ok(isequal(T{1:3, 'mat'}, v6(1:3, :)), [t 'T{i1:iN, <str>} == v<j>(i1:iN, :)']);
t_ok(isequal(T{[6;3], 'boo'}, v5([6;3])), [t 'T{ii, <str>} == v<j>(ii)']);
t_ok(isequal(T{[6;3], 'mat'}, v6([6;3], :)), [t 'T{ii, <str>} == v<j>(ii, :)']);
end
if skip_mp_table
t_skip(4, [t 'T{<*>, <cell>} : not yet implemented']);
else
t_ok(isequal(T{6:-1:3, {'flt', 'dbl', 'boo'}}, [v2(6:-1:3) v4(6:-1:3) v5(6:-1:3)]), [t 'T{iN:-1:i1, <cell>}']);
t_ok(isequal(T{6:-1:3, {'flt', 'dbl', 'mat'}}, [v2(6:-1:3) v4(6:-1:3) v6(6:-1:3, :)]), [t 'T{iN:-1:i1, <cell>}']);
t_ok(isequal(T{:, {'dbl', 'igr'}}, [v4 v1]), [t 'T{:, <cell>} == [v<j1> v<j2> ...]']);
t_ok(isequal(T{:, {'dbl', 'mat', 'igr'}}, [v4 v6 v1]), [t 'T{:, <cell>} == [v<j1> v<j2> ...]']);
end

t_ok(isequal(T{2, 'igr'}, v1(2)), [t 'T{i, <str>} == v<j>(i)']);
t_ok(isequal(T{4, 'mat'}, v6(4, :)), [t 'T{i, <str>} == v<j>(i)']);
t_ok(isequal(T{1:3, 'flt'}, v2(1:3)), [t 'T{i1:iN, <str>} == v<j>(i1:iN)']);
t_ok(isequal(T{1:3, 'mat'}, v6(1:3, :)), [t 'T{i1:iN, <str>} == v<j>(i1:iN, :)']);
t_ok(isequal(T{[6;3], 'boo'}, v5([6;3])), [t 'T{ii, <str>} == v<j>(ii)']);
t_ok(isequal(T{[6;3], 'mat'}, v6([6;3], :)), [t 'T{ii, <str>} == v<j>(ii, :)']);
t_ok(isequal(T{6:-1:3, {'flt', 'dbl', 'boo'}}, [v2(6:-1:3) v4(6:-1:3) v5(6:-1:3)]), [t 'T{iN:-1:i1, <cell>}']);
t_ok(isequal(T{6:-1:3, {'flt', 'dbl', 'mat'}}, [v2(6:-1:3) v4(6:-1:3) v6(6:-1:3, :)]), [t 'T{iN:-1:i1, <cell>}']);
t_ok(isequal(T{:, {'dbl', 'igr'}}, [v4 v1]), [t 'T{:, <cell>} == [v<j1> v<j2> ...]']);
t_ok(isequal(T{:, {'dbl', 'mat', 'igr'}}, [v4 v6 v1]), [t 'T{:, <cell>} == [v<j1> v<j2> ...]']);

t = sprintf('%s : subsasgn {} : ', cls);
T{:, 1} = var1;
Expand All @@ -260,38 +246,30 @@
t_is(T{:, [2;4;5;6]}, [v2 var4 v5 var6], 12, [t 'T{:, j1:2:jN} = <mat>']);
T{:, [2 5]} = [var2 var5]; %% reset values

T3 = table_class([1;2;3], [4;5;6], [7;8;9]);
T3{2, :} = T3{2, :} * 10;
t_is(T3{:, :}, [1 4 7; 20 50 80; 3 6 9], 12, [t 'T{i, :} = <vec>']);
T3{[1 3], :} = T3{[1 3], :} * -1;
t_is(T3{:, :}, [-1 -4 -7; 20 50 80; -3 -6 -9], 12, [t 'T{ii, :} = <mat>']);
T3{:, :} = [1 2 3; 4 5 6; 7 8 9];
t_is(T3{:, :}, [1 2 3; 4 5 6; 7 8 9], 12, [t 'T{:, :} = <mat>']);

if skip_mp_table
t_skip(6, [t 'T{:, <str>} = val : not yet implemented']);
else
T{:, 'igr'} = v1;
t_is(T.igr, v1, 12, [t 'T{:, ''igr''} = v1']);
T{:, 'flt'} = v2;
t_is(T.flt, v2, 12, [t 'T{:, ''flt''} = v2']);
T{:, 'str'} = v3;
t_ok(isequal(T.str, v3), [t 'T{:, ''str''} = v3']);
T{:, 'dbl'} = v4;
t_is(T.dbl, v4, 12, [t 'T{:, ''dbl''} = v4']);
T{:, 'boo'} = v5;
t_is(T.boo, v5, 12, [t 'T{:, ''boo''} = v5']);
T{:, 'mat'} = v6;
t_is(T.mat, v6, 12, [t 'T{:, ''mat''} = v6']);
end
if skip_mp_table
t_skip(2, 'T{:, <cell>} : not yet implemented');
else
T{:, {'str'}} = var3;
t_ok(isequal(T{:, 3}, var3), [t 'T{:, <cell>} = var3']);
T{:, {'igr', 'mat', 'dbl', 'flt', 'boo'}} = [var1 var6 var4 var2 var5];
t_is(T{:, [1;2;4;5;6]}, [var1 var2 var4 var5 var6], 12, [t 'T{:, <cell>} = <mat>']);
end
T2 = table_class([1;2;3], [4;5;6], [7;8;9]);
T2{2, :} = T2{2, :} * 10;
t_is(T2{:, :}, [1 4 7; 20 50 80; 3 6 9], 12, [t 'T{i, :} = <vec>']);
T2{[1 3], :} = T2{[1 3], :} * -1;
t_is(T2{:, :}, [-1 -4 -7; 20 50 80; -3 -6 -9], 12, [t 'T{ii, :} = <mat>']);
T2{:, :} = [1 2 3; 4 5 6; 7 8 9];
t_is(T2{:, :}, [1 2 3; 4 5 6; 7 8 9], 12, [t 'T{:, :} = <mat>']);

T{:, 'igr'} = v1;
t_is(T.igr, v1, 12, [t 'T{:, ''igr''} = v1']);
T{:, 'flt'} = v2;
t_is(T.flt, v2, 12, [t 'T{:, ''flt''} = v2']);
T{:, 'str'} = v3;
t_ok(isequal(T.str, v3), [t 'T{:, ''str''} = v3']);
T{:, 'dbl'} = v4;
t_is(T.dbl, v4, 12, [t 'T{:, ''dbl''} = v4']);
T{:, 'boo'} = v5;
t_is(T.boo, v5, 12, [t 'T{:, ''boo''} = v5']);
T{:, 'mat'} = v6;
t_is(T.mat, v6, 12, [t 'T{:, ''mat''} = v6']);
T{:, {'str'}} = var3;
t_ok(isequal(T{:, 3}, var3), [t 'T{:, <cell>} = var3']);
T{:, {'igr', 'mat', 'dbl', 'flt', 'boo'}} = [var1 var6 var4 var2 var5];
t_is(T{:, [1;2;4;5;6]}, [var1 var2 var4 var5 var6], 12, [t 'T{:, <cell>} = <mat>']);

T{2, 1} = v1(2);
t_ok(isequal(T{2, 1}, v1(2)), [t 'T{i, j} = v<j>(i)']);
Expand All @@ -314,34 +292,27 @@
T{:, [6;4;1]} = [v6 v4 v1];
t_ok(isequal(T{:, [6;4;1]}, [v6 v4 v1]), [t 'T{:, jj} = [v<j1> v<j2> ...]']);

if skip_mp_table
t_skip(8, 'T{<*>, <str>} : not yet implemented');
else
T{2, 'igr'} = var1(2);
t_ok(isequal(T{2, 1}, var1(2)), [t 'T{i, <str>} = var<j>(i)']);
T{4, 'mat'} = var6(4, :);
t_ok(isequal(T{4, 6}, var6(4, :)), [t 'T{i, <str>} = var<j>(i, :)']);
T{1:3, 'flt'} = var2(1:3);
t_ok(isequal(T.flt(1:3), var2(1:3)), [t 'T{i1:iN, <str>} = var<j>(i1:iN)']);
T{1:3, 'mat'} = var6(1:3, :);
t_ok(isequal(T.mat(1:3, :), var6(1:3, :)), [t 'T{i1:iN, <str>} = var<j>(i1:iN, :)']);
T{1:3, 'mat'} = var6(1:3, [2; 1]);
t_ok(isequal(T.mat(1:3, :), var6(1:3, [2; 1])), [t 'T{i1:iN, <str>} = var<j>(i1:iN, jj)']);
T{[6;3], 'boo'} = var5([6;3]);
t_ok(isequal(T.boo([6;3]), var5([6;3])), [t 'T{ii, <str>} = var<j>(ii)']);
T{[6;3], 'mat'} = var6([6;3], :);
t_ok(isequal(T.mat([6;3], :), var6([6;3], :)), [t 'T{ii, <str>} = var<j>(ii, :)']);
T{[6;3], 'mat'} = var6([6;3], [2;1]);
t_ok(isequal(T.mat([6;3], :), var6([6;3], [2;1])), [t 'T{ii, <str>} = v<j>(ii, jj)']);
end
if skip_mp_table
t_skip(2, 'T{<*>, <cell>} : not yet implemented');
else
T{6:-1:3, {'flt', 'dbl', 'mat', 'boo'}} = [var2(6:-1:3) var4(6:-1:3) var6(6:-1:3, :) var5(6:-1:3)];
t_ok(isequal(T{6:-1:3, [2;4;6;5]}, [var2(6:-1:3) var4(6:-1:3) var6(6:-1:3, :) var5(6:-1:3)]), [t 'T{iN:-1:i1, <cell>}']);
T{:, {'mat', 'dbl', 'igr'}} = [var6 var4 var1];
t_ok(isequal(T{:, [6;4;1]}, [var6 var4 var1]), [t 'T{:, <cell>} = [var<j1> var<j2> ...]']);
end
T{2, 'igr'} = var1(2);
t_ok(isequal(T{2, 1}, var1(2)), [t 'T{i, <str>} = var<j>(i)']);
T{4, 'mat'} = var6(4, :);
t_ok(isequal(T{4, 6}, var6(4, :)), [t 'T{i, <str>} = var<j>(i, :)']);
T{1:3, 'flt'} = var2(1:3);
t_ok(isequal(T.flt(1:3), var2(1:3)), [t 'T{i1:iN, <str>} = var<j>(i1:iN)']);
T{1:3, 'mat'} = var6(1:3, :);
t_ok(isequal(T.mat(1:3, :), var6(1:3, :)), [t 'T{i1:iN, <str>} = var<j>(i1:iN, :)']);
T{1:3, 'mat'} = var6(1:3, [2; 1]);
t_ok(isequal(T.mat(1:3, :), var6(1:3, [2; 1])), [t 'T{i1:iN, <str>} = var<j>(i1:iN, jj)']);
T{[6;3], 'boo'} = var5([6;3]);
t_ok(isequal(T.boo([6;3]), var5([6;3])), [t 'T{ii, <str>} = var<j>(ii)']);
T{[6;3], 'mat'} = var6([6;3], :);
t_ok(isequal(T.mat([6;3], :), var6([6;3], :)), [t 'T{ii, <str>} = var<j>(ii, :)']);
T{[6;3], 'mat'} = var6([6;3], [2;1]);
t_ok(isequal(T.mat([6;3], :), var6([6;3], [2;1])), [t 'T{ii, <str>} = v<j>(ii, jj)']);
T{6:-1:3, {'flt', 'dbl', 'mat', 'boo'}} = [var2(6:-1:3) var4(6:-1:3) var6(6:-1:3, :) var5(6:-1:3)];
t_ok(isequal(T{6:-1:3, [2;4;6;5]}, [var2(6:-1:3) var4(6:-1:3) var6(6:-1:3, :) var5(6:-1:3)]), [t 'T{iN:-1:i1, <cell>}']);
T{:, {'mat', 'dbl', 'igr'}} = [var6 var4 var1];
t_ok(isequal(T{:, [6;4;1]}, [var6 var4 var1]), [t 'T{:, <cell>} = [var<j1> var<j2> ...]']);

T{:, 1} = v1;
T{:, 2} = v2;
T{:, 3} = v3;
Expand All @@ -364,20 +335,16 @@
end

t = sprintf('%s : subsref () : T(ii,<cell>) : ', cls);
if skip_mp_table
t_skip(5, [t 'not yet implemented']);
ii = [2;4]; jj = [1;3;4;6]; cc = {'igr', 'str', 'dbl', 'mat'};
T2 = T(ii,cc);
t_is(size(T2), [2 4], 12, [t 'size']);
t_ok(isequal(T2.Properties.VariableNames, var_names(jj)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v1(ii), v3(ii), v4(ii), v6(ii, :)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(ii)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
ii = [2;4]; jj = [1;3;4;6]; cc = {'igr', 'str', 'dbl', 'mat'};
T2 = T(ii,cc);
t_is(size(T2), [2 4], 12, [t 'size']);
t_ok(isequal(T2.Properties.VariableNames, var_names(jj)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v1(ii), v3(ii), v4(ii), v6(ii, :)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(ii)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end

t = sprintf('%s : subsref () : T(:,j1:s:jN) : ', cls);
Expand Down Expand Up @@ -429,29 +396,25 @@
end

t = sprintf('%s : subsref () : T(i,<str>) : ', cls);
if skip_mp_table
t_skip(10, [t 'not yet implemented']);
T2 = T(5,'dbl');
t_is(size(T2), [1 1], 12, [t 'size']);
t_ok(isequal(T2.Properties.VariableNames, var_names(4)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v4(5)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(5)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
T2 = T(5,'dbl');
t_is(size(T2), [1 1], 12, [t 'size']);
t_ok(isequal(T2.Properties.VariableNames, var_names(4)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v4(5)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(5)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T2 = T(3,'mat');
t_is(size(T2), [1 1], 12, [t 'size']);
t_ok(isequal(T2.Properties.VariableNames, var_names(6)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v6(3, :)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(3)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T2 = T(3,'mat');
t_is(size(T2), [1 1], 12, [t 'size']);
t_ok(isequal(T2.Properties.VariableNames, var_names(6)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v6(3, :)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(3)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end

t = sprintf('%s : subsref () : T(end, end) : ', cls);
Expand Down Expand Up @@ -483,24 +446,20 @@
T(ii0, jj) = T2; %% restore

t = sprintf('%s : subsasgn () : T(ii,<cell>) : ', cls);
if skip_mp_table
t_skip(4, [t 'not yet implemented']);
ii0 = [2;4]; jj = [1;3;4;6]; cc = {'igr', 'str', 'dbl', 'mat'};
T3 = T(ii0,jj);
ii = [4;2];
T(ii,cc) = T3;
T2 = T(ii,jj);
t_ok(isequal(T2.Properties.VariableNames, var_names(jj)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v1(ii0), v3(ii0), v4(ii0), v6(ii0, :)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(ii)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
ii0 = [2;4]; jj = [1;3;4;6]; cc = {'igr', 'str', 'dbl', 'mat'};
T3 = T(ii0,jj);
ii = [4;2];
T(ii,cc) = T3;
T2 = T(ii,jj);
t_ok(isequal(T2.Properties.VariableNames, var_names(jj)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {v1(ii0), v3(ii0), v4(ii0), v6(ii0, :)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(ii)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T(ii0, jj) = T2; %% restore
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T(ii0, jj) = T2; %% restore

t = sprintf('%s : subsasgn () : T(:,j1:s:jN) : ', cls);
jj = [2:2:6];
Expand Down Expand Up @@ -562,38 +521,34 @@
end
T{3,6} = [3 0.3];

t = sprintf('%s : subsref () : T(i,j) : ', cls);
if skip_mp_table
t_skip(8, [t 'not yet implemented']);
t = sprintf('%s : subsref () : T(i,<str>) : ', cls);
T3 = T(5,4);
T3{1,1} = exp(1);
T(5,4) = T3;
T2 = T(5,'dbl');
t_ok(isequal(T2.Properties.VariableNames, var_names(4)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {exp(1)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(5)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
T3 = T(5,4);
T3{1,1} = exp(1);
T(5,4) = T3;
T2 = T(5,'dbl');
t_ok(isequal(T2.Properties.VariableNames, var_names(4)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {exp(1)}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(5)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T{5,4} = pi;

T3 = T(3,6);
T3{1,1} = [111 222];
T(3,6) = T3;
T2 = T(3,'mat');
t_ok(isequal(T2.Properties.VariableNames, var_names(6)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {[111 222]}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(3)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T{3,6} = [3 0.3];
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T{5,4} = pi;

T3 = T(3,6);
T3{1,1} = [111 222];
T(3,6) = T3;
T2 = T(3,'mat');
t_ok(isequal(T2.Properties.VariableNames, var_names(6)), [t 'VariableNames']);
t_ok(isequal(table_values(T2), {[111 222]}), [t 'VariableValues']);
t_ok(isequal(T2.Properties.RowNames, row_names(3)), [t 'RowNames']);
if skip_ml_tab
t_skip(1, [t 'DimensionNames not yet supported'])
else
t_ok(isequal(T2.Properties.DimensionNames, dim_names), [t 'DimensionNames']);
end
T{3,6} = [3 0.3];

%% vertical concatenation
t = sprintf('%s : vertical concatenation : ', cls);
Expand Down

0 comments on commit be4aad7

Please sign in to comment.