Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions crates/libtest-json/src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[cfg_attr(feature = "serde", serde(tag = "event"))]
#[non_exhaustive]
pub enum Event {
DiscoverStart(DiscoverStart),
DiscoverCase(DiscoverCase),
Expand Down Expand Up @@ -82,6 +83,7 @@ impl From<RunComplete> for Event {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct DiscoverStart {
#[cfg_attr(
feature = "serde",
Expand Down Expand Up @@ -122,6 +124,7 @@ impl DiscoverStart {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct DiscoverCase {
/// An identifier that is unique across the entire run
pub name: String,
Expand Down Expand Up @@ -191,6 +194,7 @@ impl DiscoverCase {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct DiscoverComplete {
#[cfg_attr(
feature = "serde",
Expand Down Expand Up @@ -228,6 +232,7 @@ impl DiscoverComplete {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct RunStart {
#[cfg_attr(
feature = "serde",
Expand Down Expand Up @@ -265,6 +270,7 @@ impl RunStart {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct CaseStart {
/// An identifier that is unique across the entire run
pub name: String,
Expand Down Expand Up @@ -309,6 +315,7 @@ impl CaseStart {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct CaseMessage {
/// An identifier that is unique across the entire run
pub name: String,
Expand Down Expand Up @@ -371,6 +378,7 @@ impl CaseMessage {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct CaseComplete {
/// An identifier that is unique across the entire run
pub name: String,
Expand Down Expand Up @@ -415,6 +423,7 @@ impl CaseComplete {
#[cfg_attr(feature = "unstable-schema", derive(schemars::JsonSchema))]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
#[non_exhaustive]
pub struct RunComplete {
#[cfg_attr(
feature = "serde",
Expand Down
1 change: 1 addition & 0 deletions crates/libtest2-harness/src/notify/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl<W: std::io::Write> super::Notifier for PrettyRunNotifier<W> {
Event::RunComplete(_) => {
self.summary.write_complete(&mut self.writer)?;
}
_ => {}
}
Ok(())
}
Expand Down
1 change: 1 addition & 0 deletions crates/libtest2-harness/src/notify/summary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ impl super::Notifier for Summary {
Event::RunComplete(inner) => {
self.elapsed_s = inner.elapsed_s;
}
_ => {}
}
Ok(())
}
Expand Down
2 changes: 2 additions & 0 deletions crates/libtest2-harness/src/notify/terse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ impl<W: std::io::Write> super::Notifier for TerseListNotifier<W> {
Event::CaseMessage(_) => {}
Event::CaseComplete(_) => {}
Event::RunComplete(_) => {}
_ => {}
}
Ok(())
}
Expand Down Expand Up @@ -83,6 +84,7 @@ impl<W: std::io::Write> super::Notifier for TerseRunNotifier<W> {
Event::RunComplete(_) => {
self.summary.write_complete(&mut self.writer)?;
}
_ => {}
}
Ok(())
}
Expand Down
Loading