Skip to content

Commit

Permalink
test coinselect display/from_str
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jan 25, 2025
1 parent 1ba38db commit c2870c8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/coinselect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,16 @@ impl Coinselect for CoinselectStrategy {
Some(res)
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn display_from_str() {
assert_eq!(CoinselectStrategy::Aggregate.to_string(), "aggregate");
assert_eq!(CoinselectStrategy::SmallSize.to_string(), "smallsize");
assert_eq!(CoinselectStrategy::Aggregate, "aggregate".parse().unwrap());
assert_eq!(CoinselectStrategy::SmallSize, "smallsize".parse().unwrap());
}
}

0 comments on commit c2870c8

Please sign in to comment.