Skip to content

Commit

Permalink
chore(wasm-gen): fix SyscallsParamsConfig::default(), improve tests (
Browse files Browse the repository at this point in the history
  • Loading branch information
StackOverflowExcept1on authored Mar 2, 2024
1 parent 6d411c2 commit ef08a10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion utils/wasm-gen/src/config/syscalls/param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ impl Default for SyscallsParamsConfig {
fn default() -> Self {
Self::new()
.with_default_regular_config()
.with_default_regular_config()
.with_default_ptr_config()
}
}

Expand Down
9 changes: 9 additions & 0 deletions utils/wasm-gen/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ fn remove_multiple_recursions() {

#[test]
fn test_avoid_waits_works() {
gear_utils::init_default_logger();

let mut rng = SmallRng::seed_from_u64(123);
let mut buf = vec![0; UNSTRUCTURED_SIZE];
rng.fill_bytes(&mut buf);
Expand All @@ -195,6 +197,8 @@ fn test_avoid_waits_works() {

#[test]
fn test_source_as_address_param() {
gear_utils::init_default_logger();

let mut rng = SmallRng::seed_from_u64(123);
let mut buf = vec![0; UNSTRUCTURED_SIZE];
rng.fill_bytes(&mut buf);
Expand Down Expand Up @@ -222,6 +226,8 @@ fn test_source_as_address_param() {

#[test]
fn test_existing_address_as_address_param() {
gear_utils::init_default_logger();

let mut rng = SmallRng::seed_from_u64(123);
let mut buf = vec![0; UNSTRUCTURED_SIZE];
rng.fill_bytes(&mut buf);
Expand Down Expand Up @@ -270,6 +276,8 @@ fn test_existing_address_as_address_param() {
// processing flow.
#[test]
fn test_msg_value_ptr() {
gear_utils::init_default_logger();

const INITIAL_BALANCE: u128 = 10_000;
const REPLY_VALUE: u128 = 1_000;

Expand Down Expand Up @@ -316,6 +324,7 @@ fn test_msg_value_ptr() {
#[test]
fn test_msg_value_ptr_dest() {
gear_utils::init_default_logger();

const INITIAL_BALANCE: u128 = 10_000;
const REPLY_VALUE: u128 = 1_000;

Expand Down

0 comments on commit ef08a10

Please sign in to comment.