forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
116 changed files
with
74 additions
and
192 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
script; | ||
|
||
use std::logging::log; | ||
|
||
fn main() { | ||
// ANCHOR: vec_new | ||
let v: Vec<u64> = Vec::new(); | ||
|
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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_fail/abort_control_flow_bad/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::revert::revert; | ||
|
||
fn main() { | ||
let x = if true { | ||
42u64 | ||
|
5 changes: 0 additions & 5 deletions
5
test/src/e2e_vm_tests/test_programs/should_fail/trait_constraints_not_satisfied/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,10 +1,5 @@ | ||
script; | ||
|
||
use std::{ | ||
assert::assert, | ||
logging::log, | ||
}; | ||
|
||
trait MyAdd { | ||
fn my_add(self, other: Self) -> Self; | ||
} | ||
|
2 changes: 1 addition & 1 deletion
2
test/src/e2e_vm_tests/test_programs/should_fail/vec/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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_fail/vec_swap_param1_out_of_bounds/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::{assert::assert, vec::Vec}; | ||
|
||
fn main() { | ||
let mut vector = Vec::new(); | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_fail/vec_swap_param2_out_of_bounds/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::{assert::assert, vec::Vec}; | ||
|
||
fn main() { | ||
let mut vector = Vec::new(); | ||
|
||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/dca/log_stdlib/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::logging::log; | ||
|
||
struct Foo { | ||
value: u64 | ||
} | ||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/abort_control_flow_good/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::revert::revert; | ||
|
||
enum Result<T, E> { | ||
Ok: T, | ||
Err: E, | ||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/addrof_intrinsic/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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/asm_expr_basic/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/language/b256_bitwise_ops/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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/binop_intrinsics/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::assert::assert; | ||
|
||
fn main() -> u64 { | ||
|
||
let a: u8 = 2; | ||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/break_and_continue/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::{assert::assert, logging::log}; | ||
|
||
const N = 10; | ||
|
||
fn simple_break_test() { | ||
|
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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/diverging_exprs/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::assert::assert; | ||
|
||
fn revert<T>() -> T { | ||
let code = 1u64; | ||
__revert(code) | ||
|
6 changes: 1 addition & 5 deletions
6
.../src/e2e_vm_tests/test_programs/should_pass/language/empty_method_initializer/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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/enum_if_let/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::{address::Address, assert::assert, identity::Identity}; | ||
|
||
enum Result<T, E> { | ||
Ok: T, | ||
Err: E, | ||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/enum_init_fn_call/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::assert::assert; | ||
|
||
struct T1 { | ||
t1: u64, | ||
} | ||
|
3 changes: 0 additions & 3 deletions
3
test/src/e2e_vm_tests/test_programs/should_pass/language/eq_and_neq/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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/eq_intrinsic/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::assert::assert; | ||
|
||
fn main() -> u64 { | ||
|
||
assert(__eq(true, true) == (true == true)); | ||
|
2 changes: 1 addition & 1 deletion
2
test/src/e2e_vm_tests/test_programs/should_pass/language/generic_impl_self/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,6 @@ | ||
script; | ||
|
||
use std::{result::*, revert::*, u128::*, assert::assert}; | ||
use std::u128::*; | ||
|
||
struct Data<T> { | ||
value: T | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,6 @@ script; | |
|
||
dep utils; | ||
|
||
use std::assert::assert; | ||
|
||
use utils::*; | ||
|
||
struct CustomType { | ||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/generic_type_inference/src/utils.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
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/impure_ifs/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::{assert::assert, logging::log}; | ||
|
||
enum Bool { | ||
True: (), | ||
False: (), | ||
|
2 changes: 0 additions & 2 deletions
2
test/src/e2e_vm_tests/test_programs/should_pass/language/inline_if_expr_const/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,7 +1,5 @@ | ||
script; | ||
|
||
use std::assert::assert; | ||
|
||
fn f(cond: bool) -> u64 { | ||
if cond { | ||
10 | ||
|
1 change: 0 additions & 1 deletion
1
test/src/e2e_vm_tests/test_programs/should_pass/language/is_prime/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,7 +1,6 @@ | ||
script; | ||
|
||
use core::*; | ||
use std::assert::assert; | ||
|
||
fn check_prime(n: u64) -> bool { | ||
if n == 0 || n == 1 { | ||
|
Oops, something went wrong.