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

Function test_tokenizer_char_literal

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

Source from the content-addressed store, hash-verified

363
364 #[test]
365 fn test_tokenizer_char_literal() {
366 let code = b"let c = 'a';";
367 let tokens: Vec<Token> = Tokenizer::new(code).collect();
368
369 let strings: Vec<_> = tokens
370 .iter()
371 .filter(|t| t.kind() == TokenKind::String)
372 .collect();
373 assert_eq!(strings.len(), 1);
374 assert_eq!(strings[0].as_str(), "'a'");
375 }
376
377 #[test]
378 fn test_tokenizer_comment() {

Callers

nothing calls this directly

Calls 3

collectMethod · 0.45
iterMethod · 0.45
kindMethod · 0.45

Tested by

no test coverage detected