Skip to content

Commit

Permalink
Fix to string format
Browse files Browse the repository at this point in the history
  • Loading branch information
yancyribbens committed Sep 9, 2024
1 parent 490b3d7 commit dc00dd1
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions src/branch_and_bound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,52 +370,43 @@ mod tests {
}

#[test]
fn select_coins_bnb_one() { assert_coin_select("1 cBTC", &["0.01000000 BTC"]); }
fn select_coins_bnb_one() { assert_coin_select("1 cBTC", &["0.01 BTC"]); }

#[test]
fn select_coins_bnb_two() { assert_coin_select("2 cBTC", &["0.02000000 BTC"]); }
fn select_coins_bnb_two() { assert_coin_select("2 cBTC", &["0.02 BTC"]); }

#[test]
fn select_coins_bnb_three() {
assert_coin_select("3 cBTC", &["0.02000000 BTC", "0.01000000 BTC"]);
}
fn select_coins_bnb_three() { assert_coin_select("3 cBTC", &["0.02 BTC", "0.01 BTC"]); }

#[test]
fn select_coins_bnb_four() {
assert_coin_select("4 cBTC", &["0.03000000 BTC", "0.01000000 BTC"]);
}
fn select_coins_bnb_four() { assert_coin_select("4 cBTC", &["0.03 BTC", "0.01 BTC"]); }

#[test]
fn select_coins_bnb_five() {
assert_coin_select("5 cBTC", &["0.03000000 BTC", "0.02000000 BTC"]);
}
fn select_coins_bnb_five() { assert_coin_select("5 cBTC", &["0.03 BTC", "0.02 BTC"]); }

#[test]
fn select_coins_bnb_six() {
assert_coin_select("6 cBTC", &["0.03000000 BTC", "0.02000000 BTC", "0.01000000 BTC"]);
assert_coin_select("6 cBTC", &["0.03 BTC", "0.02 BTC", "0.01 BTC"]);
}

#[test]
fn select_coins_bnb_seven() {
assert_coin_select("7 cBTC", &["0.04000000 BTC", "0.02000000 BTC", "0.01000000 BTC"]);
assert_coin_select("7 cBTC", &["0.04 BTC", "0.02 BTC", "0.01 BTC"]);
}

#[test]
fn select_coins_bnb_eight() {
assert_coin_select("8 cBTC", &["0.04000000 BTC", "0.03000000 BTC", "0.01000000 BTC"]);
assert_coin_select("8 cBTC", &["0.04 BTC", "0.03 BTC", "0.01 BTC"]);
}

#[test]
fn select_coins_bnb_nine() {
assert_coin_select("9 cBTC", &["0.04000000 BTC", "0.03000000 BTC", "0.02000000 BTC"]);
assert_coin_select("9 cBTC", &["0.04 BTC", "0.03 BTC", "0.02 BTC"]);
}

#[test]
fn select_coins_bnb_ten() {
assert_coin_select(
"10 cBTC",
&["0.04000000 BTC", "0.03000000 BTC", "0.02000000 BTC", "0.01000000 BTC"],
);
assert_coin_select("10 cBTC", &["0.04 BTC", "0.03 BTC", "0.02 BTC", "0.01 BTC"]);
}

#[test]
Expand Down

0 comments on commit dc00dd1

Please sign in to comment.