mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-12 21:41:10 +00:00
Correct the type of address in matterlabs events
This commit is contained in:
@@ -51,7 +51,7 @@ pub struct ExpectedOutput {
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq)]
|
||||
pub struct Event {
|
||||
pub address: Option<Address>,
|
||||
pub address: Option<String>,
|
||||
pub topics: Vec<String>,
|
||||
pub values: Calldata,
|
||||
}
|
||||
@@ -1010,4 +1010,53 @@ mod tests {
|
||||
// Assert
|
||||
assert!(resolved.is_err())
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn expected_json_can_be_deserialized1() {
|
||||
// Arrange
|
||||
let str = r#"
|
||||
{
|
||||
"return_data": [
|
||||
"1"
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"topics": [],
|
||||
"values": []
|
||||
}
|
||||
]
|
||||
}
|
||||
"#;
|
||||
|
||||
// Act
|
||||
let expected = serde_json::from_str::<Expected>(str);
|
||||
|
||||
// Assert
|
||||
expected.expect("Failed to deserialize");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn expected_json_can_be_deserialized2() {
|
||||
// Arrange
|
||||
let str = r#"
|
||||
{
|
||||
"return_data": [
|
||||
"1"
|
||||
],
|
||||
"events": [
|
||||
{
|
||||
"address": "Main.address",
|
||||
"topics": [],
|
||||
"values": []
|
||||
}
|
||||
]
|
||||
}
|
||||
"#;
|
||||
|
||||
// Act
|
||||
let expected = serde_json::from_str::<Expected>(str);
|
||||
|
||||
// Assert
|
||||
expected.expect("Failed to deserialize");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user