-
Notifications
You must be signed in to change notification settings - Fork 11
Cerberus tables tests #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Miguel Young de la Sota <[email protected]>
Signed-off-by: Josiah Kiehl <[email protected]>
Signed-off-by: Josiah Kiehl <[email protected]>
Signed-off-by: Josiah Kiehl <[email protected]>
Signed-off-by: Josiah Kiehl <[email protected]>
Signed-off-by: Josiah Kiehl <[email protected]>
Go ahead and rebase when you get a chance (I'll review as-is anyways). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd squash this into the previous and call it "fixed typo".
@@ -271,7 +283,7 @@ pub enum TypeKind<'md> { | |||
|
|||
/// A row of a [`Table`] with values of type `Type`. | |||
#[derive(Clone, Debug)] | |||
pub struct TableRow<'md, Type> { | |||
pub struct TableRow<'md, Type: std::fmt::Debug> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this bound need to be here? I think it can be moved somewhere else.
@@ -334,6 +346,12 @@ pub struct Error<'md> { | |||
pub kind: ErrorKind, | |||
} | |||
|
|||
impl std::fmt::Display for Error<'_> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a use
for std::fmt
and use just the fmt
prefix?
} | ||
|
||
#[test] | ||
fn markdownfile_parse_tables() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I might recommend for when we add more tests is to do something like rustc's UI tests: https://github.com/rust-lang/rust/blob/master/src/test/ui/fn/fn-recover-return-sign2.rs#L5
The idea being that this makes it easier to find spans instead of having to hand-code them, which can be quite painful. You can pull in files via include_str!()
.
@@ -135,7 +135,7 @@ impl<'md> Ident<'md> { | |||
self.0 | |||
} | |||
|
|||
/// Returns the textual content of the wrapped Span. | |||
/// Returns the textual content of the wrapped [`Span']. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be [`Span`]
; note both are backticks. Rustdoc parses these automatically.
Also: could you rename your commits to all start with |
(depends on #150)
Add some simple tests for Markdown table parsing.