kevingurney commented on code in PR #37176:
URL: https://github.com/apache/arrow/pull/37176#discussion_r1294892886


##########
matlab/test/arrow/tabular/tValidateArrayLengths.m:
##########
@@ -0,0 +1,71 @@
+%TVALIDATEARRAYLENGTHS Unit tests for
+%arrow.tabular.internal.validateArrayLengths.
+
+% Licensed to the Apache Software Foundation (ASF) under one or more
+% contributor license agreements.  See the NOTICE file distributed with
+% this work for additional information regarding copyright ownership.
+% The ASF licenses this file to you under the Apache License, Version
+% 2.0 (the "License"); you may not use this file except in compliance
+% with the License.  You may obtain a copy of the License at
+%
+%   http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS,
+% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+% implied.  See the License for the specific language governing
+% permissions and limitations under the License.
+
+classdef tValidateArrayLengths < matlab.unittest.TestCase
+    
+    methods(Test)
+        % Test methods
+        
+        function ArraysWithEqualLength(testCase)
+            % Verify validateArrayLengths() does not error if all the
+            % arrays have the same length.
+
+            import arrow.tabular.internal.validateArrayLengths
+
+            a = arrow.array(["A", "B", "C"]);
+            b = arrow.array([true, false, true]);
+            c = arrow.array([1, 2, 3]);
+
+            % cell array with one element
+            fcn = @() validateArrayLengths({a});
+            testCase.verifyWarningFree(fcn);
+
+            % cell array with two element
+            fcn = @() validateArrayLengths({a, b});
+            testCase.verifyWarningFree(fcn);
+            
+            % cell array with one element
+            fcn = @() validateArrayLengths({a, b, c});
+            testCase.verifyWarningFree(fcn);
+        end
+
+        function ArraysWithUnequalLengths(testCase)
+            % Verify validateArrayLengths() throws an error whose
+            % identifier is "arrow:tabular:UnequalArrayLengths" if not all

Review Comment:
   "if not all the arrays have the same length." -> "if all the arrays do not 
have the same length."



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to