From 931b99cd960e18babbdc52baa0b5e0cf35ecd695 Mon Sep 17 00:00:00 2001 From: Ranadeep Biswas Date: Mon, 29 Apr 2024 11:51:38 +0200 Subject: [PATCH] compile tests --- ibc-core/ics03-connection/types/src/events.rs | 10 ++++++++-- ibc-core/ics04-channel/types/src/events/mod.rs | 10 ++++++++-- ibc-testkit/src/fixtures/core/client/mod.rs | 6 ++++-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ibc-core/ics03-connection/types/src/events.rs b/ibc-core/ics03-connection/types/src/events.rs index 1c2879852..08f64d9e1 100644 --- a/ibc-core/ics03-connection/types/src/events.rs +++ b/ibc-core/ics03-connection/types/src/events.rs @@ -393,11 +393,17 @@ mod tests { assert_eq!(t.kind, t.event.kind); assert_eq!(t.expected_keys.len(), t.event.attributes.len()); for (i, e) in t.event.attributes.iter().enumerate() { - assert_eq!(e.key, t.expected_keys[i], "key mismatch for {:?}", t.kind); + assert_eq!( + e.key_str().unwrap(), + t.expected_keys[i], + "key mismatch for {:?}", + t.kind + ); } for (i, e) in t.event.attributes.iter().enumerate() { assert_eq!( - e.value, t.expected_values[i], + e.value_str().unwrap(), + t.expected_values[i], "value mismatch for {:?}", t.kind ); diff --git a/ibc-core/ics04-channel/types/src/events/mod.rs b/ibc-core/ics04-channel/types/src/events/mod.rs index 443119b3e..ee83a4028 100644 --- a/ibc-core/ics04-channel/types/src/events/mod.rs +++ b/ibc-core/ics04-channel/types/src/events/mod.rs @@ -1246,12 +1246,18 @@ mod tests { assert_eq!(t.kind, t.event.kind); assert_eq!(t.expected_keys.len(), t.event.attributes.len()); for (i, e) in t.event.attributes.iter().enumerate() { - assert_eq!(e.key, t.expected_keys[i], "key mismatch for {:?}", t.kind); + assert_eq!( + e.key_str().unwrap(), + t.expected_keys[i], + "key mismatch for {:?}", + t.kind + ); } assert_eq!(t.expected_values.len(), t.event.attributes.len()); for (i, e) in t.event.attributes.iter().enumerate() { assert_eq!( - e.value, t.expected_values[i], + e.value_str().unwrap(), + t.expected_values[i], "value mismatch for {:?}", t.kind ); diff --git a/ibc-testkit/src/fixtures/core/client/mod.rs b/ibc-testkit/src/fixtures/core/client/mod.rs index a536d778c..6f2f3d841 100644 --- a/ibc-testkit/src/fixtures/core/client/mod.rs +++ b/ibc-testkit/src/fixtures/core/client/mod.rs @@ -96,14 +96,16 @@ mod tests { assert_eq!(t.expected_keys.len(), t.event.attributes.len()); for (i, e) in t.event.attributes.iter().enumerate() { assert_eq!( - e.key, t.expected_keys[i], + e.key_str().unwrap(), + t.expected_keys[i], "key mismatch for {:?}", t.event_kind ); } for (i, e) in t.event.attributes.iter().enumerate() { assert_eq!( - e.value, t.expected_values[i], + e.value_str().unwrap(), + t.expected_values[i], "value mismatch for {:?}", t.event_kind );