Add unit test for rope with all 4-byte chars

This commit is contained in:
Max Brunsfeld
2021-05-14 17:53:58 -07:00
parent e860cacb9f
commit 243b66a91d
+8
View File
@@ -403,6 +403,14 @@ mod tests {
use rand::prelude::*;
use std::env;
#[test]
fn test_all_4_byte_chars() {
let mut rope = Rope::new();
let text = "🏀".repeat(256);
rope.push(&text);
assert_eq!(rope.text(), text);
}
#[test]
fn test_random() {
let iterations = env::var("ITERATIONS")