Skip to content

Commit

Permalink
Remove prints for the tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
lesa-telos committed Oct 15, 2024
1 parent 9b714cd commit 418b09a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 29 deletions.
19 changes: 4 additions & 15 deletions crates/antelope/tests/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,23 +104,12 @@ fn asset() {
fn block_id() {
let string = "048865fb643bca3b644647177f0cf363f7956794d0a7ec3bc6d29d93d9637308";

let block_id = match hex::decode(string) {
Ok(bytes) => match BlockId::from_bytes(&bytes) {
Ok(block_id) => block_id,
Err(err) => {
print!("Error creating BlockId: {}", err);
return;
}
},
Err(err) => {
print!("Error decoding hex string: {}", err);
return;
}
};
let block_id_bytes = hex::decode(string).unwrap();
let block_id = BlockId::from_bytes(&block_id_bytes).unwrap();

//assert_eq!(block_id.to_string(), string);
assert_eq!(block_id.block_num().to_string(), "76047867");
assert!(block_id.block_num() == 76047867);
assert_eq!(block_id.block_num(), 76047867);

//assert!(block_id.block_num().equals(UInt32::from(76047867))); UInt32 not
// implemented yet

Expand Down
11 changes: 2 additions & 9 deletions crates/antelope/tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ async fn chain_get_info() {

let result = client.v1_chain.get_info().await;

if let Err(e) = &result {
println!("Deserialization error: {:?}", e);
}
assert!(result.is_ok());

let result_unwrapped = result.unwrap();
Expand Down Expand Up @@ -117,7 +114,7 @@ async fn chain_send_transaction() {
"Failed transaction result should be err"
);
let failure_response = failed_result.err().unwrap();
println!("{:?}", failure_response);

match failure_response {
ClientError::SERVER(err) => {
assert_eq!(err.error.code, 3050003);
Expand Down Expand Up @@ -154,8 +151,7 @@ async fn chan_get_account() {
}
Err(e) => {
// Log or handle errors here to understand parsing issues
println!("Failed to parse JSON: {:?}", e);
panic!("Parsing failed for the given JSON data.");
panic!("Failed to parse JSON: {:?}", e);
}
}
}
Expand All @@ -167,9 +163,6 @@ pub async fn chain_get_abi() {

let result = client.v1_chain.get_abi("eosio.token".to_string()).await;

if let Err(e) = &result {
println!("Deserialization error: {:?}", e);
}
assert!(result.is_ok());

let abi_object = result.unwrap();
Expand Down
6 changes: 1 addition & 5 deletions crates/antelope/tests/serializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1152,11 +1152,7 @@ fn setcode() {
hasher.update(&wasm);
let wasm_hash = hasher.finalize();
let wasm_hash_hex = bytes_to_hex(&wasm_hash.to_vec());
println!(
"Setting contract for account: {:?}, with hash: {:?}",
account.as_string(),
wasm_hash_hex
);

assert_eq!(
wasm_hash_hex,
"295586a9f3b2de36d637dbde251106cee7b23d3fd1e4d0162df43c3bbaa6e800"
Expand Down

0 comments on commit 418b09a

Please sign in to comment.