Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
noot committed Feb 20, 2025
1 parent db259d6 commit af3bd75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/astria-core/src/connect/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -448,5 +448,11 @@ pub mod v2 {
"ETH /USD".parse::<CurrencyPair>().unwrap_err();
"ETH/ USD".parse::<CurrencyPair>().unwrap_err();
}

#[test]
fn can_parse_negative_price() {
let price = "-1".parse::<Price>().unwrap();
assert_eq!(price.get(), -1);
}
}
}

0 comments on commit af3bd75

Please sign in to comment.