-
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.
Closes partially #542 ### Summary of Changes - added an implementation of the generator - enabled tests for the generator (and removed the dummy test) - fixed an error related to constant expressions of integers being interpreted as floats - fixed an error where test files were read in an incorrect order - added a generation test for lists and maps - removed varargs from existing tests --------- Co-authored-by: Lars Reimann <[email protected]> Co-authored-by: megalinter-bot <[email protected]>
- Loading branch information
1 parent
fe0c8d5
commit c52b5e6
Showing
143 changed files
with
1,026 additions
and
304 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
10 changes: 5 additions & 5 deletions
10
tests/language/typing/creator.ts → .../language/typing/type computer/creator.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
tests/resources/generation/declarations/parameter with python name/input.sdstest
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 @@ | ||
package tests.generator.parameterWithPythonName | ||
|
||
fun f1(param: (a: Int, b: Int, c: Int) -> r: Int) | ||
fun f2(param: (a: Int, b: Int, c: Int) -> ()) | ||
|
||
segment test(param1: Int, @PythonName("param_2") param2: Int, @PythonName("param_3") param3: Int = 0) { | ||
f1((param1: Int, param2: Int, param3: Int = 0) -> 1); | ||
f2((param1: Int, param2: Int, param3: Int = 0) {}); | ||
} |
7 changes: 7 additions & 0 deletions
7
...ns/parameter with python name/output/tests/generator/parameterWithPythonName/gen_input.py
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 @@ | ||
# Steps ------------------------------------------------------------------------ | ||
|
||
def test(param1, param_2, param_3=0): | ||
f1(lambda param1, param2, param3=0: 1) | ||
def __gen_block_lambda_0(param1, param2, param3=0): | ||
pass | ||
f2(__gen_block_lambda_0) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
def test1(a, b=0): | ||
f() | ||
|
||
def test2(a, *c): | ||
def test2(a, c): | ||
f() |
Empty file.
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
tests/resources/generation/expressions/block lambda result/input.sdstest
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,26 @@ | ||
package tests.generator.blockLambdaResult | ||
|
||
fun g() -> a: Int | ||
|
||
fun h(a: Int) | ||
|
||
segment f1(l: (a: Int, b: Int) -> d: Int) { | ||
h(l(1, 2).d); | ||
} | ||
|
||
segment f2(l: (a: Int, b: Int) -> (d1: Int, e1: Int)) { | ||
h(l(1, 2).e1); | ||
h(l(1, 2).d1); | ||
} | ||
|
||
pipeline test { | ||
|
||
f1((a: Int, b: Int) { | ||
yield d = g(); | ||
}); | ||
f2((a: Int, b: Int) { | ||
yield d = g(); | ||
yield e = g(); | ||
}); | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...ion/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py
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,21 @@ | ||
# Steps ------------------------------------------------------------------------ | ||
|
||
def f1(l): | ||
h(l(1, 2)) | ||
|
||
def f2(l): | ||
h(l(1, 2)[1]) | ||
h(l(1, 2)[0]) | ||
|
||
# Pipelines -------------------------------------------------------------------- | ||
|
||
def test(): | ||
def __gen_block_lambda_0(a, b): | ||
__gen_block_lambda_result_d = g() | ||
return __gen_block_lambda_result_d | ||
f1(__gen_block_lambda_0) | ||
def __gen_block_lambda_1(a, b): | ||
__gen_block_lambda_result_d = g() | ||
__gen_block_lambda_result_e = g() | ||
return __gen_block_lambda_result_d, __gen_block_lambda_result_e | ||
f2(__gen_block_lambda_1) |
File renamed without changes.
7 changes: 3 additions & 4 deletions
7
...ip-expressions/block lambda/input.sdstest → ...on/expressions/block lambda/input.sdstest
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,17 +1,16 @@ | ||
package tests.generator.blockLambda | ||
|
||
fun f1(param: (a: Int, b: Int) -> r: Int) | ||
fun f2(param: (a: Int, vararg b: Int) -> r: Int) | ||
fun f3(param: () -> ()) | ||
fun f2(param: () -> ()) | ||
|
||
fun g() -> a: Int | ||
|
||
pipeline test { | ||
f1((a: Int, b: Int = 2) { | ||
yield d = g(); | ||
}); | ||
f2((a: Int, vararg c: Int) { | ||
f1((a: Int, c: Int) { | ||
yield d = g(); | ||
}); | ||
f3(() {}); | ||
f2(() {}); | ||
} |
Oops, something went wrong.