Skip to content

Commit 72092f6

Browse files
committed
Move tests from test-table.rb to test-array-builder.rb
1 parent 51b94d2 commit 72092f6

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

ruby/red-arrow/test/test-array-builder.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,16 @@ def assert_build(builder_class, raw_array)
146146
["Apache Arrow"],
147147
])
148148
end
149+
150+
test("list<uint>s") do
151+
array = Arrow::ArrayBuilder.build([[0, 1, 2], [3, 4]])
152+
assert_equal("list<item: uint8>", array.value_data_type.to_s)
153+
end
154+
155+
test("list<int>s") do
156+
array = Arrow::ArrayBuilder.build([[0, -1, 2], [3, 4]])
157+
assert_equal("list<item: int8>", array.value_data_type.to_s)
158+
end
149159
end
150160

151161
sub_test_case("specific builder") do

ruby/red-arrow/test/test-table.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,6 @@ def array_like.to_ary
7272
assert_equal(Arrow::Table.new(schema, [Arrow::UInt8Array.new([1, 2, 3])]),
7373
Arrow::Table.new(numbers: array_like))
7474
end
75-
76-
test("{Symbol: nested non-negative integer Array}") do
77-
table = Arrow::Table.new(numbers: [[0, 1, 2], [3, 4]])
78-
assert_equal("list<item: uint8>",
79-
table.schema["numbers"].data_type.to_s)
80-
end
81-
82-
test("{Symbol: nested signed integer Array}") do
83-
table = Arrow::Table.new(numbers: [[0, -1, 2], [3, 4]])
84-
assert_equal("list<item: int8>",
85-
table.schema["numbers"].data_type.to_s)
86-
end
8775
end
8876

8977
test("#columns") do

0 commit comments

Comments
 (0)