-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new acceptance test illustrating need for fn call ordering
- Loading branch information
Showing
3 changed files
with
30 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file was generated by Aiken | ||
# You typically do not need to edit this file | ||
|
||
requirements = [] | ||
packages = [] | ||
|
||
[etags] |
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,9 @@ | ||
name = "aiken-lang/acceptance_test_100" | ||
version = "0.0.0" | ||
license = "Apache-2.0" | ||
description = "Aiken contracts for project 'aiken-lang/100'" | ||
|
||
[repository] | ||
user = "aiken-lang" | ||
project = "100" | ||
platform = "github" |
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 @@ | ||
pub fn list(fuzzer: Option<a>) -> Option<List<a>> { | ||
inner(fuzzer, []) | ||
} | ||
|
||
fn inner(fuzzer, xs) -> Option<List<b>> { | ||
when fuzzer is { | ||
None -> Some(xs) | ||
Some(x) -> Some([x, ..xs]) | ||
} | ||
} | ||
|
||
test foo() { | ||
list(None) == Some([]) | ||
} |