forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
5c4e3b4
commit 9a980ac
Showing
27 changed files
with
338 additions
and
113 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
13 changes: 13 additions & 0 deletions
13
...src/e2e_vm_tests/test_programs/should_pass/unit_tests/contract_with_nested_libs/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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'path+from-root-53DBC6786CED201E' | ||
|
||
[[package]] | ||
name = 'script_with_nested_libs' | ||
source = 'member' | ||
dependencies = ['std'] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'path+from-root-53DBC6786CED201E' | ||
dependencies = ['core'] |
8 changes: 8 additions & 0 deletions
8
...src/e2e_vm_tests/test_programs/should_pass/unit_tests/contract_with_nested_libs/Forc.toml
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,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
name = "script_with_nested_libs" | ||
|
||
[dependencies] | ||
std = { path = "../../../../../../../sway-lib-std" } |
14 changes: 14 additions & 0 deletions
14
.../e2e_vm_tests/test_programs/should_pass/unit_tests/contract_with_nested_libs/src/inner.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
library inner; | ||
|
||
dep inner2; | ||
|
||
#[test] | ||
fn test_meaning_of_life_inner() { | ||
let meaning = 6 * 7; | ||
assert(meaning == 42); | ||
} | ||
|
||
#[test] | ||
fn log_test_inner() { | ||
std::logging::log(1u16); | ||
} |
12 changes: 12 additions & 0 deletions
12
...e2e_vm_tests/test_programs/should_pass/unit_tests/contract_with_nested_libs/src/inner2.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
library inner2; | ||
|
||
#[test] | ||
fn test_meaning_of_life_inner2() { | ||
let meaning = 6 * 7; | ||
assert(meaning == 42); | ||
} | ||
|
||
#[test] | ||
fn log_test_inner2() { | ||
std::logging::log(1u8); | ||
} |
23 changes: 23 additions & 0 deletions
23
...c/e2e_vm_tests/test_programs/should_pass/unit_tests/contract_with_nested_libs/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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
contract; | ||
|
||
dep inner; | ||
|
||
abi MyContract { | ||
fn foo(); | ||
} | ||
|
||
impl MyContract for Contract { | ||
fn foo() { } | ||
} | ||
|
||
|
||
#[test] | ||
fn test_meaning_of_life() { | ||
let meaning = 6 * 7; | ||
assert(meaning == 42); | ||
} | ||
|
||
#[test] | ||
fn log_test() { | ||
std::logging::log(1u32); | ||
} |
1 change: 1 addition & 0 deletions
1
...src/e2e_vm_tests/test_programs/should_pass/unit_tests/contract_with_nested_libs/test.toml
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 @@ | ||
category = "unit_tests_pass" |
13 changes: 13 additions & 0 deletions
13
test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/nested_libs/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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'path+from-root-6E8361428B3F8FCA' | ||
|
||
[[package]] | ||
name = 'nested_libs' | ||
source = 'member' | ||
dependencies = ['std'] | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'path+from-root-6E8361428B3F8FCA' | ||
dependencies = ['core'] |
8 changes: 8 additions & 0 deletions
8
test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/nested_libs/Forc.toml
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,8 @@ | ||
[project] | ||
authors = ["Fuel Labs <[email protected]>"] | ||
entry = "lib.sw" | ||
license = "Apache-2.0" | ||
name = "nested_libs" | ||
|
||
[dependencies] | ||
std = { path = "../../../../../../../sway-lib-std" } |
14 changes: 14 additions & 0 deletions
14
test/src/e2e_vm_tests/test_programs/should_pass/unit_tests/nested_libs/src/inner.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
library inner; | ||
|
||
dep inner2; | ||
|
||
#[test] | ||
fn test_meaning_of_life_inner() { | ||
let meaning = 6 * 7; | ||
assert(meaning == 42); | ||
} | ||
|
||
#[test] | ||
fn log_test_inner() { | ||
std::logging::log(1u16); | ||
} |
Oops, something went wrong.