Home / Function/ test_index_converter() — tailwindcss Function Reference

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
  0822fa3b_6259_ceef_ed75_0bf76e6f3126["test_index_converter()"]
  b4753452_877e_045a_5e9b_0da9561dcac2["get()"]
  0822fa3b_6259_ceef_ed75_0bf76e6f3126 -->|calls| b4753452_877e_045a_5e9b_0da9561dcac2
  style 0822fa3b_6259_ceef_ed75_0bf76e6f3126 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

Calls

Frequently Asked Questions

What does test_index_converter() do?
test_index_converter() is a function in the tailwindcss codebase.
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