Skip to content

Commit

Permalink
types/profile_grid: normalize tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlettman committed Aug 16, 2024
1 parent 89f25dc commit 40d9b6e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/types/profile_grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,17 @@ mod tests {

#[test]
fn test_default() {
let want = ProfileGrid::Off;
let got = ProfileGrid::default();
assert_eq!(ProfileGrid::Off, got);
assert_eq!(want, got);
}

#[test]
fn test_display() {
let cases = vec![(ProfileGrid::Off, "off"), (ProfileGrid::On, "on")];

for (profile_grid, want) in cases {
info!("Displaying {profile_grid:?}, expecting {want}");
info!("Displaying {profile_grid:?}, want {want}");
let got = format!("{profile_grid}");
assert_eq!(want, got);
}
Expand Down

0 comments on commit 40d9b6e

Please sign in to comment.