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

Function test_tokenizer_position

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

Source from the content-addressed store, hash-verified

732
733 #[test]
734 fn test_tokenizer_position() {
735 let mut tokenizer = Tokenizer::new(b"ab cd");
736 assert_eq!(tokenizer.position(), 0);
737
738 tokenizer.next(); // "ab"
739 assert_eq!(tokenizer.position(), 2);
740
741 tokenizer.next(); // " "
742 assert_eq!(tokenizer.position(), 3);
743 }
744
745 #[test]
746 fn test_tokenizer_is_finished() {

Callers

nothing calls this directly

Calls 1

nextMethod · 0.45

Tested by

no test coverage detected