Skip to content

Commit

Permalink
chore: add serialize_raw_data tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrxlz committed Jun 19, 2024
1 parent 2adaa0c commit 658d63e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/kos-sdk/src/chains/tron/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -615,4 +615,17 @@ mod tests {
_ => assert!(false),
}
}

#[test]
fn test_serialize_raw_data_empty_input() {
let result = TRX::serialize_raw_data_into_hex_string("");
assert!(result.is_err());
}

#[test]
fn test_serialize_raw_data_invalid_format() {
let invalid_tx = "invalid_json_format";
let result = TRX::serialize_raw_data_into_hex_string(invalid_tx);
assert!(result.is_err());
}
}

0 comments on commit 658d63e

Please sign in to comment.