Skip to content

Commit

Permalink
test: fix network conversion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
h4sh3d committed Jul 11, 2022
1 parent 9fc8416 commit 213fb45
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/blockchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,17 @@ mod tests {
}

#[test]
fn network_conversion() {
assert_eq!(Network::from(bitcoin::Network::Bitcoin), Network::Mainnet);
assert_eq!(Network::from(bitcoin::Network::Testnet), Network::Testnet);
assert_eq!(Network::from(bitcoin::Network::Signet), Network::Testnet);
assert_eq!(Network::from(bitcoin::Network::Regtest), Network::Local);
fn bitcoin_network_conversion() {
assert_eq!(bitcoin::Network::from(Network::Mainnet), bitcoin::Network::Bitcoin);
assert_eq!(bitcoin::Network::from(Network::Testnet), bitcoin::Network::Testnet);
assert_eq!(bitcoin::Network::from(Network::Local), bitcoin::Network::Regtest);
}

#[test]
fn monero_network_conversion() {
assert_eq!(monero::Network::from(Network::Mainnet), monero::Network::Mainnet);
assert_eq!(monero::Network::from(Network::Testnet), monero::Network::Stagenet);
assert_eq!(monero::Network::from(Network::Local), monero::Network::Mainnet);
}

#[test]
Expand Down

0 comments on commit 213fb45

Please sign in to comment.