-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi-contract conditional compilation via cargo features
- Loading branch information
1 parent
eb656dd
commit bf6dc3d
Showing
17 changed files
with
464 additions
and
15 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
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
42 changes: 42 additions & 0 deletions
42
contracts/feature-tests/multi-contract-features/scenarios/mcf-example-feature.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,42 @@ | ||
{ | ||
"steps": [ | ||
{ | ||
"step": "setState", | ||
"accounts": { | ||
"sc:mcf": { | ||
"code": "file:../output/multi-contract-features.wasm" | ||
}, | ||
"sc:mcf-example-feature": { | ||
"code": "file:../output/multi-contract-example-feature.wasm" | ||
}, | ||
"address:owner": {} | ||
} | ||
}, | ||
{ | ||
"step": "scQuery", | ||
"id": "example_feature_message", | ||
"tx": { | ||
"to": "sc:mcf-example-feature", | ||
"function": "example_feature_message" | ||
}, | ||
"expect": { | ||
"out": [ | ||
"str:example-feature on" | ||
] | ||
} | ||
}, | ||
{ | ||
"step": "scQuery", | ||
"id": "example_feature_message", | ||
"tx": { | ||
"to": "sc:mcf", | ||
"function": "example_feature_message" | ||
}, | ||
"expect": { | ||
"out": [ | ||
"str:example-feature off" | ||
] | ||
} | ||
} | ||
] | ||
} |
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
13 changes: 9 additions & 4 deletions
13
contracts/feature-tests/multi-contract-features/tests/multi_contract_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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
#[test] | ||
fn external_pure_go() { | ||
multiversx_sc_scenario::run_go("scenarios/external-pure.scen.json"); | ||
fn mcf_example_feature_go() { | ||
multiversx_sc_scenario::run_go("scenarios/mcf-example-feature.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn external_get_go() { | ||
multiversx_sc_scenario::run_go("scenarios/external-get.scen.json"); | ||
fn mcf_external_pure_go() { | ||
multiversx_sc_scenario::run_go("scenarios/mcf-external-pure.scen.json"); | ||
} | ||
|
||
#[test] | ||
fn mcf_external_get_go() { | ||
multiversx_sc_scenario::run_go("scenarios/mcf-external-get.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
262 changes: 262 additions & 0 deletions
262
...acts/feature-tests/multi-contract-features/wasm-multi-contract-example-feature/Cargo.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.