-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generates Rust integration tests based on scenarios provided in the scenarios folder of each contract.
- Loading branch information
1 parent
8c1438e
commit 7c02b14
Showing
56 changed files
with
440 additions
and
178 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
bridged-tokens-wrapper/tests/bridged_tokens_wrapper_scenario_go_test.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
use multiversx_sc_scenario::*; | ||
|
||
fn world() -> ScenarioWorld { | ||
ScenarioWorld::vm_go() | ||
} | ||
|
||
#[test] | ||
fn add_wrapped_token_go() { | ||
world().run("scenarios/add_wrapped_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn blacklist_token_go() { | ||
world().run("scenarios/blacklist_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn remove_wrapped_token_go() { | ||
world().run("scenarios/remove_wrapped_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn setup_go() { | ||
world().run("scenarios/setup.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn unwrap_token_go() { | ||
world().run("scenarios/unwrap_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn whitelist_token_go() { | ||
world().run("scenarios/whitelist_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn wrap_token_go() { | ||
world().run("scenarios/wrap_token.scen.json"); | ||
} |
40 changes: 40 additions & 0 deletions
40
bridged-tokens-wrapper/tests/bridged_tokens_wrapper_scenario_rs_test.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
use multiversx_sc_scenario::*; | ||
|
||
fn world() -> ScenarioWorld { | ||
todo!() | ||
} | ||
|
||
#[test] | ||
fn add_wrapped_token_rs() { | ||
world().run("scenarios/add_wrapped_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn blacklist_token_rs() { | ||
world().run("scenarios/blacklist_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn remove_wrapped_token_rs() { | ||
world().run("scenarios/remove_wrapped_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn setup_rs() { | ||
world().run("scenarios/setup.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn unwrap_token_rs() { | ||
world().run("scenarios/unwrap_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn whitelist_token_rs() { | ||
world().run("scenarios/whitelist_token.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn wrap_token_rs() { | ||
world().run("scenarios/wrap_token.scen.json"); | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
use multiversx_sc_scenario::*; | ||
|
||
fn world() -> ScenarioWorld { | ||
ScenarioWorld::vm_go() | ||
} | ||
|
||
#[test] | ||
fn add_refund_batch_go() { | ||
world().run("scenarios/add_refund_batch.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_another_tx_ok_go() { | ||
world().run("scenarios/create_another_tx_ok.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_another_tx_too_late_for_batch_go() { | ||
world().run("scenarios/create_another_tx_too_late_for_batch.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_transaction_ok_go() { | ||
world().run("scenarios/create_transaction_ok.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_transaction_over_max_amount_go() { | ||
world().run("scenarios/create_transaction_over_max_amount.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn distribute_fees_go() { | ||
world().run("scenarios/distribute_fees.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_batch_both_rejected_go() { | ||
world().run("scenarios/execute_batch_both_rejected.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_batch_both_success_go() { | ||
world().run("scenarios/execute_batch_both_success.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_batch_one_success_one_rejected_go() { | ||
world().run("scenarios/execute_batch_one_success_one_rejected.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_transaction_rejected_go() { | ||
world().run("scenarios/execute_transaction_rejected.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_transaction_success_go() { | ||
world().run("scenarios/execute_transaction_success.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn get_next_pending_tx_go() { | ||
world().run("scenarios/get_next_pending_tx.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn get_next_tx_batch_go() { | ||
world().run("scenarios/get_next_tx_batch.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn get_next_tx_batch_too_early_go() { | ||
world().run("scenarios/get_next_tx_batch_too_early.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn setup_accounts_go() { | ||
world().run("scenarios/setup_accounts.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn zero_fees_go() { | ||
world().run("scenarios/zero_fees.scen.json"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
use multiversx_sc_scenario::*; | ||
|
||
fn world() -> ScenarioWorld { | ||
todo!() | ||
} | ||
|
||
#[test] | ||
fn add_refund_batch_rs() { | ||
world().run("scenarios/add_refund_batch.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_another_tx_ok_rs() { | ||
world().run("scenarios/create_another_tx_ok.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_another_tx_too_late_for_batch_rs() { | ||
world().run("scenarios/create_another_tx_too_late_for_batch.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_transaction_ok_rs() { | ||
world().run("scenarios/create_transaction_ok.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn create_transaction_over_max_amount_rs() { | ||
world().run("scenarios/create_transaction_over_max_amount.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn distribute_fees_rs() { | ||
world().run("scenarios/distribute_fees.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_batch_both_rejected_rs() { | ||
world().run("scenarios/execute_batch_both_rejected.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_batch_both_success_rs() { | ||
world().run("scenarios/execute_batch_both_success.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_batch_one_success_one_rejected_rs() { | ||
world().run("scenarios/execute_batch_one_success_one_rejected.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_transaction_rejected_rs() { | ||
world().run("scenarios/execute_transaction_rejected.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn execute_transaction_success_rs() { | ||
world().run("scenarios/execute_transaction_success.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn get_next_pending_tx_rs() { | ||
world().run("scenarios/get_next_pending_tx.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn get_next_tx_batch_rs() { | ||
world().run("scenarios/get_next_tx_batch.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn get_next_tx_batch_too_early_rs() { | ||
world().run("scenarios/get_next_tx_batch_too_early.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn setup_accounts_rs() { | ||
world().run("scenarios/setup_accounts.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn zero_fees_rs() { | ||
world().run("scenarios/zero_fees.scen.json"); | ||
} |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
45 changes: 45 additions & 0 deletions
45
multi-transfer-esdt/tests/multi_transfer_esdt_scenario_go_test.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
use multiversx_sc_scenario::*; | ||
|
||
fn world() -> ScenarioWorld { | ||
ScenarioWorld::vm_go() | ||
} | ||
|
||
#[test] | ||
fn batch_transfer_both_executed_go() { | ||
world().run("scenarios/batch_transfer_both_executed.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn batch_transfer_both_failed_go() { | ||
world().run("scenarios/batch_transfer_both_failed.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn batch_transfer_one_executed_one_failed_go() { | ||
world().run("scenarios/batch_transfer_one_executed_one_failed.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn batch_transfer_to_frozen_account_go() { | ||
world().run("scenarios/batch_transfer_to_frozen_account.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn batch_transfer_with_wrapping_go() { | ||
world().run("scenarios/batch_transfer_with_wrapping.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn setup_accounts_go() { | ||
world().run("scenarios/setup_accounts.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn transfer_ok_go() { | ||
world().run("scenarios/transfer_ok.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn two_transfers_same_token_go() { | ||
world().run("scenarios/two_transfers_same_token.scen.json"); | ||
} |
Oops, something went wrong.