-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating contract tests after IR. Also, some cleanup. (#1141)
* Updating contract tests after IR. Also, some cleanup. * fixing std lib dependency * disabling the broken test again
- Loading branch information
1 parent
264f60b
commit 56b3eb9
Showing
34 changed files
with
56 additions
and
207 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
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: 4 additions & 1 deletion
5
...ests/test_programs/should_pass/require_contract_deployment/call_basic_storage/src/main.sw
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,13 +1,16 @@ | ||
script; | ||
use basic_storage_abi::StoreU64; | ||
use std::assert::assert; | ||
|
||
fn main() -> u64 { | ||
let addr = abi(StoreU64, 0x3eedeb06664177bd0dea0a1fe0d6e9645c45b8693c902f3a6f67649044f41c9a); | ||
let addr = abi(StoreU64, 0xf4e12fcac2187e1ac5599476c531560cb6f7aa39bd05d20312a4bd237900b4e4); | ||
let key = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; | ||
let value = 4242; | ||
|
||
addr.store_u64(key, value); | ||
|
||
let res = addr.get_u64(key); | ||
assert(res == value); | ||
|
||
res | ||
} |
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: 5 additions & 3 deletions
8
..._tests/test_programs/should_pass/require_contract_deployment/caller_auth_test/src/main.sw
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,11 @@ | ||
script; | ||
use std::{chain::auth::caller_is_external, constants::NATIVE_ASSET_ID}; | ||
use auth_testing_abi::AuthTesting; | ||
use std::assert::assert; | ||
|
||
// should be false in the case of a script | ||
fn main() -> bool { | ||
let caller = abi(AuthTesting, 0x4bc450bf26a5ebca955ed8e58ca281bcba64065a802a2b1cfa5cdefdeec1610e); | ||
caller.returns_gm_one() | ||
let caller = abi(AuthTesting, 0x8c65dd66e3d56a405b5cb329ade3a36e961f4e23038fa3bb3d066feebbf39c1f); | ||
let result = caller.returns_gm_one(); | ||
assert(result); | ||
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
3 changes: 0 additions & 3 deletions
3
...2e_vm_tests/test_programs/should_pass/require_contract_deployment/contract_call/Forc.lock
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
...2e_vm_tests/test_programs/should_pass/require_contract_deployment/contract_call/Forc.toml
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
.../test_programs/should_pass/require_contract_deployment/contract_call/json_abi_oracle.json
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
..._vm_tests/test_programs/should_pass/require_contract_deployment/contract_call/src/main.sw
This file was deleted.
Oops, something went wrong.
6 changes: 2 additions & 4 deletions
6
...sts/test_programs/should_pass/require_contract_deployment/storage_access_caller/Forc.lock
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
4 changes: 2 additions & 2 deletions
4
...s/test_programs/should_pass/require_contract_deployment/storage_access_caller/src/main.sw
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
6 changes: 2 additions & 4 deletions
6
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/context_testing_abi/Forc.lock
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,13 +1,11 @@ | ||
[[package]] | ||
name = 'context_testing_abi' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#7b973a638d5220228be616f1f89a249846001549'] | ||
dependencies = ['std'] | ||
|
||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#7b973a638d5220228be616f1f89a249846001549' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
dependencies = ['core'] |
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
6 changes: 2 additions & 4 deletions
6
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/test_fuel_coin_abi/Forc.lock
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,13 +1,11 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44' | ||
dependencies = [] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'git+https://github.com/FuelLabs/sway-lib-std?reference=master#7b973a638d5220228be616f1f89a249846001549' | ||
dependencies = ['core git+https://github.com/FuelLabs/sway-lib-core?reference=master#30274cf817c1848e28f984c2e8703eb25e7a3a44'] | ||
dependencies = ['core'] | ||
|
||
[[package]] | ||
name = 'test_fuel_coin_abi' | ||
dependencies = ['std git+https://github.com/FuelLabs/sway-lib-std?reference=master#7b973a638d5220228be616f1f89a249846001549'] | ||
dependencies = ['std'] |
1 change: 0 additions & 1 deletion
1
test/src/e2e_vm_tests/test_programs/should_pass/test_abis/test_fuel_coin_abi/src/main.sw
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,6 +1,5 @@ | ||
library test_fuel_coin_abi; | ||
|
||
use std::address::Address; | ||
use std::contract_id::ContractId; | ||
|
||
abi TestFuelCoin { | ||
|
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
1 change: 0 additions & 1 deletion
1
...c/e2e_vm_tests/test_programs/should_pass/test_contracts/balance_test_contract/src/main.sw
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,6 +1,5 @@ | ||
contract; | ||
|
||
use std::context::*; | ||
use balance_test_abi::BalanceTest; | ||
|
||
impl BalanceTest for Contract { | ||
|
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
1 change: 0 additions & 1 deletion
1
test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/basic_storage/src/main.sw
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,6 +1,5 @@ | ||
contract; | ||
use std::storage::*; | ||
use std::hash::*; | ||
use basic_storage_abi::*; | ||
|
||
impl StoreU64 for Contract { | ||
|
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
2 changes: 1 addition & 1 deletion
2
...2e_vm_tests/test_programs/should_pass/test_contracts/context_testing_contract/src/main.sw
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
3 changes: 0 additions & 3 deletions
3
test/src/e2e_vm_tests/test_programs/should_pass/test_contracts/contract_abi_impl/Forc.lock
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.