From ac63405d5296be7585c881530e71eda799b818d9 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Wed, 27 Mar 2024 16:59:42 +0000 Subject: [PATCH] test: fix missing wasm test --- starknet-core/src/types/eth_address.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/starknet-core/src/types/eth_address.rs b/starknet-core/src/types/eth_address.rs index ae2fab2a..e0c6beb6 100644 --- a/starknet-core/src/types/eth_address.rs +++ b/starknet-core/src/types/eth_address.rs @@ -28,7 +28,7 @@ mod errors { InvalidHexString, } - #[derive(PartialEq, Debug)] + #[derive(Debug, PartialEq)] pub struct FromFieldElementError; #[derive(Debug)] @@ -192,9 +192,10 @@ impl From<[u8; 20]> for EthAddress { #[cfg(test)] mod tests { - use super::EthAddress; - use crate::types::eth_address::FromFieldElementError; + use super::{EthAddress, FromFieldElementError}; + use alloc::vec::*; + use hex_literal::hex; use starknet_ff::FieldElement; @@ -285,6 +286,7 @@ mod tests { } #[test] + #[cfg_attr(target_arch = "wasm32", wasm_bindgen_test::wasm_bindgen_test)] #[should_panic(expected = "FromBytesSliceError")] fn test_eth_address_from_slice_invalid_slice() { let buffer: Vec = vec![0, 1, 2, 3, 4, 5, 6, 7];