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

Function test_tokenizer_arrow_operators

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

Source from the content-addressed store, hash-verified

299
300 #[test]
301 fn test_tokenizer_arrow_operators() {
302 let code = b"fn() -> i32 { x => y }";
303 let tokens: Vec<Token> = Tokenizer::new(code).collect();
304
305 let ops: Vec<_> = tokens
306 .iter()
307 .filter(|t| t.kind() == TokenKind::Operator)
308 .collect();
309 assert!(ops.iter().any(|t| t.as_str() == "->"));
310 assert!(ops.iter().any(|t| t.as_str() == "=>"));
311 }
312
313 #[test]
314 fn test_tokenizer_scope_operator() {

Callers

nothing calls this directly

Calls 3

collectMethod · 0.45
iterMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected