MCPcopy Create free account
hub / github.com/apache/arrow / test_n_nulls

Method test_n_nulls

c_glib/test/test-array-builder.rb:328–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326
327module ArrayBuilderNNullsTests
328 def test_n_nulls
329 builder = create_builder
330 sample_values_with_null = sample_values
331 sample_values_with_null[2, 0] = nil
332 null_counts = [builder.n_nulls]
333 sample_values_with_null.each do |value|
334 if value.nil?
335 builder.append_null
336 else
337 builder.append_value(value)
338 end
339 null_counts << builder.n_nulls
340 end
341 expected_null_counts = [0, 0, 0] + [1] * (sample_values_with_null.length - 2)
342 assert_equal(expected_null_counts,
343 null_counts)
344 end
345end
346
347class TestArrayBuilder < Test::Unit::TestCase

Callers

nothing calls this directly

Calls 4

n_nullsMethod · 0.45
eachMethod · 0.45
append_valueMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected