Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] add tests for assigns sort #137

Merged
merged 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions tests/unit/TestNoOptimizeCapture/Test.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
class Test {
var classvar = 10;

public function new() {
var functionvar = 15;
function bar(x) {
classvar = functionvar + x;
functionvar = x + 1;
}
bar(7);
trace(functionvar);
trace(classvar);
}

static function main() {
new Test();
}
}
1 change: 1 addition & 0 deletions tests/unit/TestNoOptimizeCapture/compile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-D hl_no_opt
11 changes: 11 additions & 0 deletions tests/unit/TestNoOptimizeCapture/input.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--ci
test.hl
"b Test.hx:7"
"b Test.hx:11"
r
"p this"
"p functionvar"
r
"p this"
"p functionvar"
q
19 changes: 19 additions & 0 deletions tests/unit/TestNoOptimizeCapture/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
> b Test.hx:7
Breakpoint set line 7
> b Test.hx:11
Breakpoint set line 11
> r
Thread paused Test.hx:7
> p this
Test : Test
classvar = 10 : Int
> p functionvar
[15] : Array<Int>
> r
Thread paused Test.hx:11 ($Test::__constructor__)
> p this
Test : Test
classvar = 22 : Int
> p functionvar
[8] : Array<Int>
> q