| 27 | |
| 28 | sub_test_case(".new") do |
| 29 | def test_new |
| 30 | run_ends = build_int32_array([2, 5, 6]) |
| 31 | values = build_string_array(["hello", "hi", "world"]) |
| 32 | array = Arrow::RunEndEncodedArray.new(@data_type, |
| 33 | 6, |
| 34 | run_ends, |
| 35 | values, |
| 36 | 0) |
| 37 | assert_equal(<<-STRING.chomp, array.to_s) |
| 38 | |
| 39 | -- run_ends: |
| 40 | [ |
| 41 | 2, |
| 42 | 5, |
| 43 | 6 |
| 44 | ] |
| 45 | -- values: |
| 46 | [ |
| 47 | "hello", |
| 48 | "hi", |
| 49 | "world" |
| 50 | ] |
| 51 | STRING |
| 52 | end |
| 53 | end |
| 54 | |
| 55 | sub_test_case("instance methods") do |