You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2021/09/05 20:01:48 UTC

[arrow] branch master updated: ARROW-13909: [GLib] Add tests for GArrowVarianceOptions

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 2588e17  ARROW-13909: [GLib] Add tests for GArrowVarianceOptions
2588e17 is described below

commit 2588e1773f4570d34146318f5b01e81f36df35dd
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Mon Sep 6 05:00:29 2021 +0900

    ARROW-13909: [GLib] Add tests for GArrowVarianceOptions
    
    Closes #11089 from kou/glib-variance-options-test
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 c_glib/test/test-variance-options.rb | 46 ++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/c_glib/test/test-variance-options.rb b/c_glib/test/test-variance-options.rb
new file mode 100644
index 0000000..64bdf67
--- /dev/null
+++ b/c_glib/test/test-variance-options.rb
@@ -0,0 +1,46 @@
+# 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.
+
+class TestVarianceOptions < Test::Unit::TestCase
+  include Helper::Buildable
+
+  def setup
+    @options = Arrow::VarianceOptions.new
+  end
+
+  def test_ddof
+    assert_equal(0, @options.ddof)
+    @options.ddof = 1
+    assert_equal(1, @options.ddof)
+  end
+
+  def test_skip_nulls
+    assert do
+      @options.skip_nulls?
+    end
+    @options.skip_nulls = false
+    assert do
+      not @options.skip_nulls?
+    end
+  end
+
+  def test_min_count
+    assert_equal(0, @options.min_count)
+    @options.min_count = 1
+    assert_equal(1, @options.min_count)
+  end
+end