Skip to content

Commit

Permalink
scrypto 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz2891 committed Nov 28, 2024
1 parent 4dbc84a commit 720f854
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 40 deletions.
6 changes: 2 additions & 4 deletions src/core/aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ mod aggregate_matrix_tests {
core::{aggregator::aggregate_matrix, config::Config},
helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down Expand Up @@ -157,8 +156,7 @@ mod make_value_signer_matrix {
network::specific::U256,
protocol::data_package::DataPackage,
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/core/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ mod tests {
helpers::iter_into::IterInto,
protocol::{data_package::DataPackage, payload::Payload},
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/core/validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ mod tests {
protocol::constants::{MAX_TIMESTAMP_AHEAD_MS, MAX_TIMESTAMP_DELAY_MS},
};
use itertools::Itertools;
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/crypto/keccak256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ pub fn keccak256(data: &[u8]) -> Keccak256Hash {
#[cfg(test)]
mod tests {
use crate::{crypto::keccak256::keccak256, helpers::hex::hex_to_bytes};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/crypto/recover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ mod tests {
crypto::recover::{crypto256::recover_public_key, recover_address},
helpers::hex::hex_to_bytes,
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/helpers/iter_into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ mod iter_into_tests {
helpers::iter_into::{IterInto, IterIntoOpt, OptIterIntoOpt},
network::specific::U256,
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/network/as_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ mod tests {
as_str::{AsAsciiStr, AsHexStr},
specific::U256,
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
6 changes: 2 additions & 4 deletions src/network/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ mod assert_or_revert_tests {
assert::{assert_or_revert_bool_with, Assert},
error::Error,
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down Expand Up @@ -111,8 +110,7 @@ mod assert_or_revert_tests {
#[cfg(test)]
mod unwrap_or_revert_tests {
use crate::network::{assert::Unwrap, error::Error};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/network/flattened.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ impl Flattened<Bytes> for Vec<Bytes> {
#[cfg(test)]
mod tests {
use crate::network::{flattened::Flattened, specific::Bytes};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/network/from_bytes_repr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ mod tests {
from_bytes_repr::FromBytesRepr,
specific::{U256, VALUE_SIZE},
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/protocol/data_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ mod tests {
data_point::DataPoint,
},
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/protocol/data_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ mod tests {
},
};
use std::ops::Shr;
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/protocol/marker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ mod tests {
helpers::hex::hex_to_bytes,
protocol::{constants::REDSTONE_MARKER_BS, marker::trim_redstone_marker},
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/protocol/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ mod tests {
payload::{trim_metadata, trim_payload, Payload},
},
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/utils/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ impl<T: Copy> FilterSome<Vec<T>> for [Option<T>] {
#[cfg(test)]
mod filter_some_tests {
use crate::utils::filter::FilterSome;
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/utils/median.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ mod tests {
use crate::network::specific::U256;
use itertools::Itertools;
use std::fmt::Debug;
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/utils/trim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ mod tests {
protocol::constants::{REDSTONE_MARKER, REDSTONE_MARKER_BS},
utils::trim::Trim,
};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down
3 changes: 1 addition & 2 deletions src/utils/trim_zeros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ impl TrimZeros for Vec<u8> {
#[cfg(test)]
mod tests {
use crate::{protocol::constants::REDSTONE_MARKER, utils::trim_zeros::TrimZeros};
#[cfg(not(target_arch = "wasm32"))]
use test;

#[cfg(target_arch = "wasm32")]
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down

0 comments on commit 720f854

Please sign in to comment.