| 29 | |
| 30 | sub_test_case(".new") do |
| 31 | def test_new |
| 32 | indices = build_int32_array([0, 2, 2, 1, 0]) |
| 33 | dictionary_array = Arrow::DictionaryArray.new(@data_type, |
| 34 | indices, |
| 35 | @dictionary) |
| 36 | assert_equal(<<-STRING.chomp, dictionary_array.to_s) |
| 37 | |
| 38 | -- dictionary: |
| 39 | [ |
| 40 | "C", |
| 41 | "C++", |
| 42 | "Ruby" |
| 43 | ] |
| 44 | -- indices: |
| 45 | [ |
| 46 | 0, |
| 47 | 2, |
| 48 | 2, |
| 49 | 1, |
| 50 | 0 |
| 51 | ] |
| 52 | STRING |
| 53 | end |
| 54 | end |
| 55 | |
| 56 | sub_test_case("instance methods") do |