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

Function test_tokenizer_python_style

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

Source from the content-addressed store, hash-verified

791
792 #[test]
793 fn test_tokenizer_python_style() {
794 let code = b"def greet(name): // greeting\n print(f\"Hello {name}\")";
795 let tokens: Vec<Token> = Tokenizer::new(code).collect();
796
797 assert!(tokens.iter().any(|t| t.as_str() == "def"));
798 // Note: We only recognize // comments, not # comments
799 assert!(tokens.iter().any(|t| t.kind() == TokenKind::Comment));
800 assert!(tokens.iter().any(|t| t.kind() == TokenKind::Newline));
801 }
802
803 #[test]
804 fn test_tokenizer_complex_expression() {

Callers

nothing calls this directly

Calls 1

collectMethod · 0.45

Tested by

no test coverage detected