Skip to content

Commit

Permalink
test.py: assignments inside expr
Browse files Browse the repository at this point in the history
  • Loading branch information
wkhere committed Nov 5, 2024
1 parent 31f4da5 commit b1f95e6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion NEXT
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ more on errors:

+ vm impl

- test cases for assignments inside expr, to demonstrate they are valid
+ test cases for assignments inside expr, to demonstrate they are valid

- reflection: allow filling toplevel structs of different types

Expand Down
5 changes: 5 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@

[122.1, f'print {(1<<31)-1}-1', f'{ (1<<31)-2}'],
[122.2, f'print -{(1<<31)-1}+1', f'{-(1<<31)+2}'],

[123.1, 'var a; print "foo"+(a=1); print a', 'foo1\n1'],
[123.2, 'var a; print 2+(a=1); print a', '3\n1'],
[123.3, 'def b{print "foo"+(a=1); print a}', 'foo1\n1'],
[123.4, 'def b{var a; print "foo"+(a=1); print a}', 'foo1\n1'],
]

tests_64b = [
Expand Down
4 changes: 4 additions & 0 deletions testapi_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b1f95e6

Please sign in to comment.