pub struct GoldenFile {
pub name: String,
pub source: String,
pub expected_ast: String,
pub actual_ast: Option<String>,
}Expand description
A single golden-file test: parse source and compare the printed AST
against expected_ast.
The expected_ast should match the output of print_decl exactly
(modulo normalised whitespace).
Fields§
§name: StringDescriptive test name.
source: StringOxiLean source snippet to parse.
expected_ast: StringExpected pretty-printed AST string.
actual_ast: Option<String>Populated by check with the actual printed AST.
Implementations§
Trait Implementations§
Source§impl Clone for GoldenFile
impl Clone for GoldenFile
Source§fn clone(&self) -> GoldenFile
fn clone(&self) -> GoldenFile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GoldenFile
impl RefUnwindSafe for GoldenFile
impl Send for GoldenFile
impl Sync for GoldenFile
impl Unpin for GoldenFile
impl UnsafeUnpin for GoldenFile
impl UnwindSafe for GoldenFile
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