Skip to content

Commit

Permalink
Move unnecessary usage of SDK for tests to e2e tests (FuelLabs#1687)
Browse files Browse the repository at this point in the history
* Move b256 bitwise ops test.

* Move option test.

* Move require test.

* Remove unneeded gitignore files.

* Move result test.

* Move intrinsics test.

* Move contract ID test.

* Move EVM ECR test.

* Remove moved test mods
  • Loading branch information
adlerjohn authored May 26, 2022
1 parent fbb2f22 commit 1f0aec1
Show file tree
Hide file tree
Showing 39 changed files with 34 additions and 146 deletions.
13 changes: 13 additions & 0 deletions test/src/e2e_vm_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ pub fn run(filter_regex: Option<regex::Regex>) {
"should_pass/language/b256_bad_jumps",
ProgramState::Return(1),
),
(
"should_pass/language/b256_bitwise_ops",
ProgramState::Return(1),
),
("should_pass/language/b256_ops", ProgramState::Return(100)),
(
"should_pass/language/struct_field_access",
Expand Down Expand Up @@ -120,7 +124,16 @@ pub fn run(filter_regex: Option<regex::Regex>) {
"should_pass/stdlib/b512_struct_alignment",
ProgramState::Return(1), // true
),
(
"should_pass/stdlib/contract_id_type",
ProgramState::Return(1),
), // true
("should_pass/stdlib/evm_ecr", ProgramState::Return(1)), // true
("should_pass/stdlib/ge_test", ProgramState::Return(1)), // true
("should_pass/stdlib/intrinsics", ProgramState::Return(1)), // true
("should_pass/stdlib/option", ProgramState::Return(1)), // true
("should_pass/stdlib/require", ProgramState::Return(1)), // true
("should_pass/stdlib/result", ProgramState::Return(1)), // true
("should_pass/stdlib/u128_test", ProgramState::Return(1)), // true
("should_pass/stdlib/u128_div_test", ProgramState::Return(1)), // true
("should_pass/stdlib/u128_mul_test", ProgramState::Return(1)), // true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[package]]
name = 'b256_ops'
name = 'b256_bitwise_ops'
dependencies = ['std']

[[package]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[project]
authors = ["Fuel Labs <[email protected]>"]
entry = "main.sw"
license = "Apache-2.0"
name = "b256_bitwise_ops"

[dependencies]
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ license = "Apache-2.0"
name = "contract_id_type"

[dependencies]
std = { path = "../../../../../sway-lib-std" }
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ license = "Apache-2.0"
name = "evm_ecr"

[dependencies]
std = { path = "../../../../../sway-lib-std" }
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ license = "Apache-2.0"
name = "intrinsics"

[dependencies]
std = { path = "../../../../../sway-lib-std" }
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ license = "Apache-2.0"
name = "option"

[dependencies]
std = { path = "../../../../../sway-lib-std" }
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ script;
use std::option::*;
use std::revert::revert;

fn main() {
fn main() -> bool {
test_some();
test_none();
test_unwrap_some();

true
}

fn test_some() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ license = "Apache-2.0"
name = "require"

[dependencies]
std = { path = "../../../../../sway-lib-std" }
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ license = "Apache-2.0"
name = "result"

[dependencies]
std = { path = "../../../../../sway-lib-std" }
std = { path = "../../../../../../../sway-lib-std" }
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ script;
use std::result::*;
use std::revert::revert;

fn main() {
fn main() -> bool {
test_ok();
test_err();
test_unwrap_ok();

true
}

fn test_ok() {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions test/src/sdk-harness/test_projects/b256_ops/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions test/src/sdk-harness/test_projects/b256_ops/Forc.toml

This file was deleted.

8 changes: 0 additions & 8 deletions test/src/sdk-harness/test_projects/b256_ops/mod.rs

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions test/src/sdk-harness/test_projects/contract_id_type/mod.rs

This file was deleted.

2 changes: 0 additions & 2 deletions test/src/sdk-harness/test_projects/evm_ecr/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions test/src/sdk-harness/test_projects/evm_ecr/mod.rs

This file was deleted.

7 changes: 0 additions & 7 deletions test/src/sdk-harness/test_projects/harness.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
// Add test modules here:

mod auth;
mod b256_ops;
mod call_frames;
mod context;
mod contract_id_type;
mod evm_ecr;
mod hashing;
mod intrinsics;
mod logging;
mod option;
mod reentrancy;
mod registers;
mod require;
mod result;
mod token_ops;
mod tx_fields;
2 changes: 0 additions & 2 deletions test/src/sdk-harness/test_projects/intrinsics/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions test/src/sdk-harness/test_projects/intrinsics/mod.rs

This file was deleted.

33 changes: 0 additions & 33 deletions test/src/sdk-harness/test_projects/option/mod.rs

This file was deleted.

2 changes: 0 additions & 2 deletions test/src/sdk-harness/test_projects/require/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions test/src/sdk-harness/test_projects/require/mod.rs

This file was deleted.

33 changes: 0 additions & 33 deletions test/src/sdk-harness/test_projects/result/mod.rs

This file was deleted.

0 comments on commit 1f0aec1

Please sign in to comment.