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

Class DictionaryArrayTest

ruby/red-arrow/test/test-dictionary-array.rb:18–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16# under the License.
17
18class DictionaryArrayTest < Test::Unit::TestCase
19 sub_test_case("instance methods") do
20 def setup
21 @values = ["a", "b", "c", "b", "a"]
22 @string_array = Arrow::StringArray.new(@values)
23 @array = @string_array.dictionary_encode
24 end
25
26 test("#[]") do
27 assert_equal(@values, @array.to_a)
28 end
29
30 test("#get_value") do
31 assert_equal([
32 @values[0],
33 @values[3],
34 ],
35 [
36 @array.get_value(0),
37 @array.get_value(3),
38 ])
39 end
40 end
41end

Callers

nothing calls this directly

Calls 3

testFunction · 0.85
to_aMethod · 0.45
get_valueMethod · 0.45

Tested by

no test coverage detected