| 42 | end |
| 43 | |
| 44 | def test_string |
| 45 | array = build_string_array(["Ruby", "Ruby", "Python", "C++", "C++", "C++"]) |
| 46 | assert_equal(<<-STRING.chomp, array.run_end_encode.to_s) |
| 47 | |
| 48 | -- run_ends: |
| 49 | [ |
| 50 | 2, |
| 51 | 3, |
| 52 | 6 |
| 53 | ] |
| 54 | -- values: |
| 55 | [ |
| 56 | "Ruby", |
| 57 | "Python", |
| 58 | "C++" |
| 59 | ] |
| 60 | STRING |
| 61 | assert_equal(array, array.run_end_encode.decode) |
| 62 | end |
| 63 | end |