-
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.
external functions: Ability to pass arguments to functions
- Loading branch information
Showing
7 changed files
with
142 additions
and
48 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
proto test_do_literally_nothing | ||
# Test external function returns. | ||
|
||
proto test_do_literally_nothing -> none | ||
assert test_do_literally_nothing() == none | ||
|
||
proto test_return_number | ||
proto test_return_number -> int | ||
assert test_return_number() == 420 | ||
|
||
proto test_return_bool | ||
proto test_return_bool -> bool | ||
assert test_return_bool() == true | ||
|
||
proto test_return_str | ||
proto test_return_str -> str | ||
assert test_return_str() == "zonnebloemgranen" | ||
|
||
proto test_return_none | ||
proto test_return_none -> none | ||
assert test_return_none() == none | ||
|
||
# Test external function arguments. | ||
|
||
proto test_sub(a: int, b: int) -> int | ||
assert test_sub(420, 69) == 420 - 69 |