Skip to content

Commit

Permalink
test: fix or remove ignored tests in pow_data.rs (#3206)
Browse files Browse the repository at this point in the history
  • Loading branch information
stringhandler committed Aug 18, 2021
2 parents cc9c2ca + fda0d0a commit d9412c2
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions base_layer/core/src/proof_of_work/monero_rx/pow_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,27 +150,15 @@ mod test {
use super::*;
use monero::TxIn;

#[ignore]
#[test]
#[should_panic(expected = "capacity overflow")]
fn simple_capacity_overflow_panic() {
let data = &[0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f];
let _ = deserialize::<Vec<TxIn>>(data);
}

#[ignore]
#[test]
fn oom_moneroblock_deserialize() {
let data = [
0x09, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x95, 0x95, 0x95,
0x95, 0x01, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00,
0x04, 0x00, 0x00, 0x00, 0x95, 0x00, 0x00, 0x00, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95, 0x95,
];
let _ = deserialize::<monero::Block>(&data);
}

#[ignore]
#[test]
#[should_panic(expected = "capacity overflow")]
fn panic_alloc_capacity_overflow_moneroblock_deserialize() {
let data = [
0x0f, 0x9e, 0xa5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04,
Expand Down

0 comments on commit d9412c2

Please sign in to comment.