Skip to content

Commit

Permalink
1. Prefix test cases with "Test".
Browse files Browse the repository at this point in the history
2. Fix typo where "after" was repeated twice.
  • Loading branch information
kevingurney committed Aug 29, 2023
1 parent 7aa1984 commit 39edb7f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions matlab/test/arrow/array/tDate32Array.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function TestValid(testCase)
testCase.verifyEqual(datetime(array), dates');
end

function InferNullsTrueNVPair(testCase)
function TestInferNullsTrueNVPair(testCase)
% Verify arrow.array.Date32Array.fromMATLAB() behaves as
% expected when InferNulls=true is provided.
dates = testCase.MissingDates;
Expand All @@ -90,7 +90,7 @@ function InferNullsTrueNVPair(testCase)
testCase.verifyEqual(datetime(array), dates');
end

function InferNullsFalseNVPair(testCase)
function TestInferNullsFalseNVPair(testCase)
% Verify arrow.array.Date32Array.fromMATLAB() behaves as
% expected when InferNulls=false is provided.
dates = testCase.MissingDates;
Expand Down Expand Up @@ -126,7 +126,7 @@ function TestValidNVPair(testCase)
testCase.verifyEqual(toMATLAB(array), expectedDates);
end

function EmptyDatetimeVector(testCase)
function TestEmptyDatetimeVector(testCase)
% Verify arrow.array.Date32Array.fromMATLAB() accepts any
% empty-shaped datetime as input.

Expand All @@ -144,7 +144,7 @@ function EmptyDatetimeVector(testCase)
testCase.verifyEqual(toMATLAB(array), datetime.empty(0, 1));
end

function ErrorIfNonVector(testCase)
function TestErrorIfNonVector(testCase)
% Verify arrow.array.Date32Array.fromMATLAB() throws an error
% if the input provided is not a vector.

Expand All @@ -158,7 +158,7 @@ function ErrorIfNonVector(testCase)
testCase.verifyError(fcn, "arrow:array:InvalidShape");
end

function ErrorIfNonDatetime(testCase)
function TestErrorIfNonDatetime(testCase)
% Verify arrow.array.Date32Array.fromMATLAB() throws an error
% if not given a datetime as input.

Expand All @@ -171,7 +171,7 @@ function ErrorIfNonDatetime(testCase)
testCase.verifyError(fcn, "arrow:array:InvalidType");
end

function Int32MaxDays(testCase)
function TestInt32MaxDays(testCase)
% Verify that no precision is lost when trying to round-trip a
% datetime value that is within abs(intmin("int32")) days before
% and intmax("int32") days after the UNIX epoch.
Expand All @@ -193,10 +193,10 @@ function Int32MaxDays(testCase)
testCase.verifyEqual(actualAfter, expectedAfter);
end

function GreaterThanInt32MaxDays(testCase)
function TestGreaterThanInt32MaxDays(testCase)
% Verify that precision is lost when trying to round-trip a
% datetime that is more than abs(intmin("int32")) days before
% or more than intmax("int32") after after the UNIX epoch.
% or more than intmax("int32") after the UNIX epoch.

% Cast to int64 before taking the absolute value to avoid loss
% of precision.
Expand All @@ -215,7 +215,7 @@ function GreaterThanInt32MaxDays(testCase)
testCase.verifyNotEqual(actualAfter, expectedAfter);
end

function ZonedDatetime(testCase)
function TestZonedDatetime(testCase)
% Verify that zoned datetimes are supported as inputs to the
% fromMATLAB method and that the output datetime returned by
% the toMATLAB method is unzoned.
Expand All @@ -229,7 +229,7 @@ function ZonedDatetime(testCase)
testCase.verifyEqual(actual, expected);
end

function Int32MaxDaysZoned(testCase)
function TestInt32MaxDaysZoned(testCase)
% Verify that zoned datetimes which are within abs(intmin("int32")) days
% before and intmax("int32") days after the UNIX epoch are round-tripped
% (not including the TimeZone).
Expand Down Expand Up @@ -260,7 +260,7 @@ function Int32MaxDaysZoned(testCase)
testCase.verifyEqual(actualAfter, expectedUnzonedAfter);
end

function NonWholeDaysRoundDown(testCase)
function TestNonWholeDaysRoundDown(testCase)
% Verify that datetimes which are not whole days (i.e. are not
% datetimes with zero hours, zero minutes, and zero seconds),
% round down to the nearest whole day when round-tripping with
Expand Down Expand Up @@ -292,4 +292,4 @@ function verifyDate32Type(testCase, actual)

end

end
end

0 comments on commit 39edb7f

Please sign in to comment.