Skip to content

Commit

Permalink
Add from tests for presentables.
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 committed Jan 30, 2024
1 parent b7aea7a commit b6e4da2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions workspace_tests/src/fmt/presentable/list_bulleted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ fn deserialize() -> Result<(), serde_yaml::Error> {
);
Ok(())
}

#[test]
fn from() {
assert_eq!(
ListBulleted::new(vec!["abc"]),
ListBulleted::from(vec!["abc"])
);
}
8 changes: 8 additions & 0 deletions workspace_tests/src/fmt/presentable/list_bulleted_aligned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@ fn deserialize() -> Result<(), serde_yaml::Error> {
);
Ok(())
}

#[test]
fn from() {
assert_eq!(
ListBulletedAligned::new(vec![("abc", "def")]),
ListBulletedAligned::from(vec![("abc", "def")])
);
}
8 changes: 8 additions & 0 deletions workspace_tests/src/fmt/presentable/list_numbered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ fn deserialize() -> Result<(), serde_yaml::Error> {
);
Ok(())
}

#[test]
fn from() {
assert_eq!(
ListNumbered::new(vec!["abc"]),
ListNumbered::from(vec!["abc"])
);
}
8 changes: 8 additions & 0 deletions workspace_tests/src/fmt/presentable/list_numbered_aligned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@ fn deserialize() -> Result<(), serde_yaml::Error> {
);
Ok(())
}

#[test]
fn from() {
assert_eq!(
ListNumberedAligned::new(vec![("abc", "def")]),
ListNumberedAligned::from(vec![("abc", "def")])
);
}

0 comments on commit b6e4da2

Please sign in to comment.