Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
malik672 committed Dec 11, 2024
1 parent c4e0ef7 commit 20c895b
Showing 1 changed file with 49 additions and 13 deletions.
62 changes: 49 additions & 13 deletions examples/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ mod tests {
])
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(info.logs[0].data.data.to_vec(), value1.bytes32()[0].to_vec());
assert_eq!(info.logs[1].data.data.to_vec(), value2.bytes32()[0].to_vec());
assert_eq!(info.logs[0].data.data.to_vec(), value1.bytes32().to_vec());
assert_eq!(
info.logs[1].data.data.to_vec(),
value2.bytes32()[0].to_vec()
);

let info = contract
.execute(&[
Expand All @@ -142,9 +145,18 @@ mod tests {
])
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(info.logs[0].data.data.to_vec(), value1.bytes32()[0].to_vec());
assert_eq!(info.logs[1].data.data.to_vec(), value2.bytes32()[0].to_vec());
assert_eq!(info.logs[2].data.data.to_vec(), value3.bytes32()[0].to_vec());
assert_eq!(
info.logs[0].data.data.to_vec(),
value1.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[1].data.data.to_vec(),
value2.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[2].data.data.to_vec(),
value3.bytes32()[0].to_vec()
);

let info = contract
.execute(&[
Expand All @@ -154,10 +166,22 @@ mod tests {
])
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(info.logs[0].data.data.to_vec(), value1.bytes32()[0].to_vec());
assert_eq!(info.logs[1].data.data.to_vec(), value2.bytes32()[0].to_vec());
assert_eq!(info.logs[2].data.data.to_vec(), value3.bytes32()[0].to_vec());
assert_eq!(info.logs[3].data.data.to_vec(), value4.bytes32()[0].to_vec());
assert_eq!(
info.logs[0].data.data.to_vec(),
value1.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[1].data.data.to_vec(),
value2.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[2].data.data.to_vec(),
value3.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[3].data.data.to_vec(),
value4.bytes32()[0].to_vec()
);

let info = contract
.execute(&[
Expand All @@ -169,10 +193,22 @@ mod tests {
])
.unwrap();
assert!(!info.logs.is_empty());
assert_eq!(info.logs[0].data.data.to_vec(), value1.bytes32()[0].to_vec());
assert_eq!(info.logs[1].data.data.to_vec(), value2.bytes32()[0].to_vec());
assert_eq!(info.logs[2].data.data.to_vec(), value3.bytes32()[0].to_vec());
assert_eq!(info.logs[3].data.data.to_vec(), value4.bytes32()[0].to_vec());
assert_eq!(
info.logs[0].data.data.to_vec(),
value1.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[1].data.data.to_vec(),
value2.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[2].data.data.to_vec(),
value3.bytes32()[0].to_vec()
);
assert_eq!(
info.logs[3].data.data.to_vec(),
value4.bytes32()[0].to_vec()
);
}
}
}
Expand Down

0 comments on commit 20c895b

Please sign in to comment.