-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1155 from multiversx/scenario-static-api-2
StaticApi in tests
- Loading branch information
Showing
10 changed files
with
43 additions
and
70 deletions.
There are no files selected for viewing
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
5 changes: 2 additions & 3 deletions
5
contracts/feature-tests/alloc-features/tests/alloc_features_general_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
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
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
8 changes: 3 additions & 5 deletions
8
contracts/feature-tests/basic-features/tests/basic_features_managed_buffer_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 |
---|---|---|
@@ -1,20 +1,18 @@ | ||
use multiversx_sc::types::{ManagedAddress, ManagedBuffer}; | ||
use multiversx_sc_scenario::*; | ||
use multiversx_sc_scenario::{api::StaticApi, *}; | ||
|
||
use basic_features::managed_buffer_features::ManagedBufferFeatures; | ||
|
||
#[test] | ||
fn test_managed_buffer_new_empty() { | ||
let _ = DebugApi::dummy(); | ||
let bf = basic_features::contract_obj::<DebugApi>(); | ||
let bf = basic_features::contract_obj::<StaticApi>(); | ||
let result = bf.mbuffer_new(); | ||
assert_eq!(ManagedBuffer::new(), result); | ||
} | ||
|
||
#[test] | ||
fn test_managed_address_zero() { | ||
let _ = DebugApi::dummy(); | ||
let bf = basic_features::contract_obj::<DebugApi>(); | ||
let bf = basic_features::contract_obj::<StaticApi>(); | ||
let result = bf.managed_address_zero(); | ||
assert_eq!(ManagedAddress::zero(), result); | ||
} |
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
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
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
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
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