From 39edb7fc4b975b3479e0e0a5239c4e58ed2ab3c9 Mon Sep 17 00:00:00 2001 From: Kevin Gurney Date: Tue, 29 Aug 2023 19:41:48 -0400 Subject: [PATCH] 1. Prefix test cases with "Test". 2. Fix typo where "after" was repeated twice. --- matlab/test/arrow/array/tDate32Array.m | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/matlab/test/arrow/array/tDate32Array.m b/matlab/test/arrow/array/tDate32Array.m index b9018b859c364..a5fc1c1b64838 100644 --- a/matlab/test/arrow/array/tDate32Array.m +++ b/matlab/test/arrow/array/tDate32Array.m @@ -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; @@ -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; @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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. @@ -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). @@ -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 @@ -292,4 +292,4 @@ function verifyDate32Type(testCase, actual) end -end \ No newline at end of file +end