| 802 | |
| 803 | #[test] |
| 804 | fn test_map() { |
| 805 | let input = vec![ |
| 806 | // Note mix of short/long strings |
| 807 | Some("A"), |
| 808 | Some("bcdefghijklmnop1234567"), |
| 809 | Some("X"), |
| 810 | Some("Y"), |
| 811 | None, |
| 812 | Some("qrstuvqxyzhjwya"), |
| 813 | Some("✨🔥"), |
| 814 | Some("🔥"), |
| 815 | Some("🔥🔥🔥🔥🔥🔥"), |
| 816 | ]; |
| 817 | |
| 818 | let mut test_map = TestMap::new(); |
| 819 | test_map.insert(&input); |
| 820 | test_map.insert(&input); // put it in twice |
| 821 | let expected_output: ArrayRef = Arc::new(StringViewArray::from(input)); |
| 822 | assert_eq!(&test_map.into_array(), &expected_output); |
| 823 | } |
| 824 | } |