MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_token_offsets

Function test_token_offsets

atomic-core/src/diff/token/tests.rs:84–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

82
83 #[test]
84 fn test_token_offsets() {
85 let token = Token::new(b"test", TokenKind::Word, 10);
86 assert_eq!(token.offset(), 10);
87 assert_eq!(token.len(), 4);
88 assert_eq!(token.end_offset(), 14);
89 assert_eq!(token.byte_range(), 10..14);
90 }
91
92 #[test]
93 fn test_token_empty() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected