Skip to content

Commit

Permalink
Add more 'complex_multistatement_lambdas' tests & perform some test g…
Browse files Browse the repository at this point in the history
…ardening
  • Loading branch information
Scony committed Sep 15, 2024
1 parent f1fb2a2 commit 89b8200
Show file tree
Hide file tree
Showing 6 changed files with 421 additions and 572 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ func foo(x):
pass
func bar(x,y):
pass
func baz():
func actual_params():
foo(func():
var x = 1
return x)
Expand Down Expand Up @@ -53,3 +53,169 @@ func baz():
func():
var y = 1
return y)

func arrays():
var x1 = [func():
var x = 1
return x]
var x2 = [func():
var x = 1
return x
]
var x3 = [func():
var x = 1
return x,func():
var x = 1
return x
]
var x4 = [func():
var x = 1
return x,
func():
var x = 1
return x
]
var x5 = [func():
var x = 1
return x,

func():
var x = 1
return x
]
var x6 = [func():
var x = 1
if x > 0:
print(x),
func():
var x = 1
return x
]
var x7 = [func():
var x = 1
if x > 0:
print(x),

func():
var x = 1
return x
]

func dicts():
var x1 = {'a':func():
var x = 1
return x}
var x2 = {'a':func():
var x = 1
return x
}
var x3 = {'a':func():
var x = 1
return x,'b':func():
var x = 1
return x
}
var x4 = {'a':func():
var x = 1
return x,
'b':func():
var x = 1
return x
}
var x5 = {'a':func():
var x = 1
return x,'b':
func():
var x = 1
return x
}
var x6 = {'a':func():
var x = 1
return x,

'b':func():
var x = 1
return x
}
var x7 = {'a':func():
var x = 1
if x > 0:
print(x),'b':func():
var x = 1
return x
}
var x8 = {'a':func():
var x = 1
if x > 0:
print(x),
'b':func():
var x = 1
return x
}
var x9 = {'a':func():
var x = 1
if x > 0:
print(x),

'b':func():
var x = 1
return x
}

func nested():
var x1 = func():
var x1r = func():
var x = 1
return x
return x1r

var x2 = func():
var x2r = func():
pass
pass
pass

var x3 = func():
var x3r = func():
var x3rr = func():
pass
pass
pass
pass

var x4 = func():
if true:
var x4r = func():
pass
pass
pass
pass

var x5 = func():
if true:
var x5r = func():
if true:
pass
pass
pass
pass
pass

var x6 = func():
if true:
var x6r = func():
if true:
var x6rr = func():
pass
pass
pass
pass
pass
pass

# TODO: fix
# var x7 = [func():
# pass
# var x = func():
# pass
# pass,]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ func bar(x, y):
pass


func baz():
func actual_params():
foo(
func():
var x = 1
Expand Down Expand Up @@ -73,3 +73,205 @@ func baz():
var y = 1
return y
)


func arrays():
var x1 = [
func():
var x = 1
return x
]
var x2 = [
func():
var x = 1
return x
]
var x3 = [
func():
var x = 1
return x,
func():
var x = 1
return x
]
var x4 = [
func():
var x = 1
return x,
func():
var x = 1
return x
]
var x5 = [
func():
var x = 1
return x,
func():
var x = 1
return x
]
var x6 = [
func():
var x = 1
if x > 0:
print(x),
func():
var x = 1
return x
]
var x7 = [
func():
var x = 1
if x > 0:
print(x),
func():
var x = 1
return x
]


func dicts():
var x1 = {
"a":
func():
var x = 1
return x
}
var x2 = {
"a":
func():
var x = 1
return x
}
var x3 = {
"a":
func():
var x = 1
return x,
"b":
func():
var x = 1
return x
}
var x4 = {
"a":
func():
var x = 1
return x,
"b":
func():
var x = 1
return x
}
var x5 = {
"a":
func():
var x = 1
return x,
"b":
func():
var x = 1
return x
}
var x6 = {
"a":
func():
var x = 1
return x,
"b":
func():
var x = 1
return x
}
var x7 = {
"a":
func():
var x = 1
if x > 0:
print(x),
"b":
func():
var x = 1
return x
}
var x8 = {
"a":
func():
var x = 1
if x > 0:
print(x),
"b":
func():
var x = 1
return x
}
var x9 = {
"a":
func():
var x = 1
if x > 0:
print(x),
"b":
func():
var x = 1
return x
}


func nested():
var x1 = func():
var x1r = func():
var x = 1
return x
return x1r

var x2 = func():
var x2r = func():
pass
pass
pass

var x3 = func():
var x3r = func():
var x3rr = func():
pass
pass
pass
pass

var x4 = func():
if true:
var x4r = func():
pass
pass
pass
pass

var x5 = func():
if true:
var x5r = func():
if true:
pass
pass
pass
pass
pass

var x6 = func():
if true:
var x6r = func():
if true:
var x6rr = func():
pass
pass
pass
pass
pass
pass

# TODO: fix
# var x7 = [func():
# pass
# var x = func():
# pass
# pass,]
Loading

0 comments on commit 89b8200

Please sign in to comment.