test_index_converter() — tailwindcss Function Reference
Architecture documentation for the test_index_converter() function in utf16.rs from the tailwindcss codebase.
Entity Profile
Dependency Diagram
graph TD 99252edc_4d96_1ae5_eeef_e49071ff7a8e["test_index_converter()"] 7a49803e_c498_1a8f_e430_3827f8691042["utf16.rs"] 99252edc_4d96_1ae5_eeef_e49071ff7a8e -->|defined in| 7a49803e_c498_1a8f_e430_3827f8691042 5a977327_5735_65ab_07a9_349764828b1f["get()"] 99252edc_4d96_1ae5_eeef_e49071ff7a8e -->|calls| 5a977327_5735_65ab_07a9_349764828b1f style 99252edc_4d96_1ae5_eeef_e49071ff7a8e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
crates/node/src/utf16.rs lines 55–93
fn test_index_converter() {
let mut converter = IndexConverter::new("Hello 🔥🥳 world!");
let map = HashMap::from([
// hello<space>
(0, 0),
(1, 1),
(2, 2),
(3, 3),
(4, 4),
(5, 5),
(6, 6),
// inside the 🔥
(7, 8),
(8, 8),
(9, 8),
(10, 8),
// inside the 🥳
(11, 10),
(12, 10),
(13, 10),
(14, 10),
// <space>world!
(15, 11),
(16, 12),
(17, 13),
(18, 14),
(19, 15),
(20, 16),
(21, 17),
// Past the end should return the last utf-16 character index
(22, 17),
(100, 17),
]);
for (idx_utf8, idx_utf16) in map {
assert_eq!(converter.get(idx_utf8), idx_utf16);
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_index_converter() do?
test_index_converter() is a function in the tailwindcss codebase, defined in crates/node/src/utf16.rs.
Where is test_index_converter() defined?
test_index_converter() is defined in crates/node/src/utf16.rs at line 55.
What does test_index_converter() call?
test_index_converter() calls 1 function(s): get.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free