Skip to content

Commit

Permalink
#7 extra test
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 21, 2023
1 parent fcca386 commit 09fa5b1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,19 @@ use crate::Pair::Present;
use anyhow::Result;

#[test]
fn displays_map() -> Result<()> {
fn debugs_map() -> Result<()> {
let mut m: Map<&str, i32, 10> = Map::new();
m.insert("one", 42);
m.insert("two", 16);
assert_eq!("{one: 42, two: 16}", format!("{:?}", m));
Ok(())
}

#[test]
fn displays_map() -> Result<()> {
let mut m: Map<&str, i32, 10> = Map::new();
m.insert("one", 42);
m.insert("two", 16);
assert_eq!("{one: 42, two: 16}", format!("{}", m));
Ok(())
}

0 comments on commit 09fa5b1

Please sign in to comment.