Skip to content

Commit

Permalink
Update TabularDisplay tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sgilmore10 committed Oct 26, 2023
1 parent ead411d commit 10209c4
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions matlab/test/arrow/tabular/tTabularDisplay.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function ZeroRowsZeroColumns(testCase, TabularType)
classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
ClassName=TabularType.ClassName, BoldFont=true);
zeroString = getNumString(0);
header = compose(" %s with %s rows and %s columns", classNameString, zeroString, zeroString);
header = compose(" Arrow %s with %s rows and %s columns", classNameString, zeroString, zeroString);
expectedDisplay = char(header + newline + newline);
actualDisplay = evalc('disp(tabularObj)');

Expand All @@ -65,7 +65,7 @@ function ZeroRowsOneColumn(testCase, TabularType)

classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
ClassName=TabularType.ClassName, BoldFont=true);
header = compose(" %s with %s rows and %s column", classNameString, getNumString(0), getNumString(1));
header = compose(" Arrow %s with %s rows and %s column:", classNameString, getNumString(0), getNumString(1));

fieldString = makeFieldString("Number", "Float64", "arrow.type.Float64Type");
schema = join([" Schema:" " " + fieldString], [newline newline]);
Expand All @@ -86,11 +86,11 @@ function OneRowOneColumn(testCase, TabularType)

classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
ClassName=TabularType.ClassName, BoldFont=true);
header = compose(" %s with %s row and %s column", classNameString, getNumString(1), getNumString(1));
header = compose(" Arrow %s with %s row and %s column:", classNameString, getNumString(1), getNumString(1));

fieldString = makeFieldString("Number", "Float64", "arrow.type.Float64Type");
schema = join([" Schema:" " " + fieldString], [newline newline]);
row = join([" Sample Data Row:" " 1"], [newline newline]);
row = join([" First Row:" " 1"], [newline newline]);


expectedDisplay = char(join([header schema row + newline + newline], [newline newline]));
Expand All @@ -109,15 +109,15 @@ function ManyRowsAndColumns(testCase, TabularType)

classNameString = makeLinkString(FullClassName=TabularType.FullClassName, ...
ClassName=TabularType.ClassName, BoldFont=true);
header = compose(" %s with %s rows and %s columns", classNameString, getNumString(2), getNumString(3));
header = compose(" Arrow %s with %s rows and %s columns:", classNameString, getNumString(2), getNumString(3));

fieldOneString = makeFieldString("Number", "Float64", "arrow.type.Float64Type");
fieldTwoString = makeFieldString("Letter", "String", "arrow.type.StringType");
fieldThreeString = makeFieldString("Logical", "Boolean", "arrow.type.BooleanType");

fields = join([fieldOneString fieldTwoString fieldThreeString], " | ");
schema = join([" Schema:" " " + fields], [newline newline]);
row = join([" Sample Data Row:" " 1 | ""A"" | true"], [newline newline]);
row = join([" First Row:" " 1 | ""A"" | true"], [newline newline]);

expectedDisplay = char(join([header schema row + newline + newline], [newline newline]));
actualDisplay = evalc('disp(tabularObj)');
Expand Down

0 comments on commit 10209c4

Please sign in to comment.