MCPcopy Create free account
hub / github.com/csskit/csskit / test_filling_buffer_with_skip_tokens

Function test_filling_buffer_with_skip_tokens

crates/css_parse/src/parser.rs:443–453  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

441
442#[test]
443fn test_filling_buffer_with_skip_tokens() {
444 let str = "/*x*//*x*//*x*//*x*//*x*//*x*//*x*//*x*//*x*//*x*//*x*/a";
445 let bump = bumpalo::Bump::default();
446 let lexer = css_lexer::Lexer::new(&css_lexer::EmptyAtomSet::ATOMS, str);
447 let mut p = Parser::new(&bump, str, lexer);
448 let c = p.next();
449 assert_eq!(c.token(), Kind::Ident);
450 // Must not panic:
451 let _ = p.at_end();
452 let _ = p.offset();
453}
454
455#[test]
456fn peek_and_next() {

Callers

nothing calls this directly

Calls 3

nextMethod · 0.45
at_endMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected