pub struct LexerTester { /* private fields */ }Expand description
A lexer testing utility that can run tests against multiple files.
The LexerTester provides functionality to test lexers against a directory
of files with specific extensions, comparing actual output against expected
results stored in JSON files.
Implementations§
Source§impl LexerTester
impl LexerTester
Sourcepub fn new<P: AsRef<Path>>(root: P) -> Self
pub fn new<P: AsRef<Path>>(root: P) -> Self
Creates a new lexer tester with the specified root directory.
Sourcepub fn with_extension(self, extension: impl ToString) -> Self
pub fn with_extension(self, extension: impl ToString) -> Self
Adds a file extension to test against.
Sourcepub fn with_timeout(self, time: Duration) -> Self
pub fn with_timeout(self, time: Duration) -> Self
Sets the timeout duration for each test.
Auto Trait Implementations§
impl Freeze for LexerTester
impl RefUnwindSafe for LexerTester
impl Send for LexerTester
impl Sync for LexerTester
impl Unpin for LexerTester
impl UnwindSafe for LexerTester
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more