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

Function test_token_new

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

Source from the content-addressed store, hash-verified

66
67 #[test]
68 fn test_token_new() {
69 let token = Token::new(b"hello", TokenKind::Word, 0);
70 assert_eq!(token.content(), b"hello");
71 assert_eq!(token.kind(), TokenKind::Word);
72 assert_eq!(token.offset(), 0);
73 assert_eq!(token.len(), 5);
74 assert!(!token.is_empty());
75 }
76
77 #[test]
78 fn test_token_as_str() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected