Skip to content

Commit

Permalink
Fix tests to match compiler change
Browse files Browse the repository at this point in the history
  • Loading branch information
netalondon committed Sep 16, 2024
1 parent 1df6e51 commit abcdfa9
Show file tree
Hide file tree
Showing 9 changed files with 245 additions and 244 deletions.
8 changes: 4 additions & 4 deletions projects/src/samples/project_11/average.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ export const compiled = `function Main.main 4
pop local 0
push constant 0
pop local 2
label L0
label Main_L0
push local 2
push local 1
lt
not
if-goto L1
if-goto Main_L1
push local 2
push local 0
add
Expand Down Expand Up @@ -394,8 +394,8 @@ label L0
push constant 1
add
pop local 2
goto L0
label L1
goto Main_L0
label Main_L1
push constant 15
call String.new 1
push constant 84
Expand Down
16 changes: 8 additions & 8 deletions projects/src/samples/project_11/complex_arrays.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ export const compiled = `function Main.main 3
push constant 0
eq
not
if-goto L1
if-goto Main_L1
push local 0
push constant 10
call Main.fill 2
Expand Down Expand Up @@ -1529,9 +1529,9 @@ export const compiled = `function Main.main 3
pop pointer 1
push temp 0
pop that 0
goto L0
label L1
label L0
goto Main_L0
label Main_L1
label Main_L0
push constant 44
call String.new 1
push constant 84
Expand Down Expand Up @@ -1744,12 +1744,12 @@ function Main.double 0
call Math.multiply 2
return
function Main.fill 0
label L2
label Main_L2
push argument 1
push constant 0
gt
not
if-goto L3
if-goto Main_L3
push argument 1
push constant 1
sub
Expand All @@ -1763,7 +1763,7 @@ label L2
pop pointer 1
push temp 0
pop that 0
goto L2
label L3
goto Main_L2
label Main_L3
push constant 0
return`;
40 changes: 20 additions & 20 deletions projects/src/samples/project_11/convert_to_bin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,10 @@ function Main.convert 3
push constant 1
neg
pop local 2
label L0
label Main_L0
push local 2
not
if-goto L1
if-goto Main_L1
push local 1
push constant 1
add
Expand All @@ -661,61 +661,61 @@ label L0
gt
not
not
if-goto L3
if-goto Main_L3
push argument 0
push local 0
and
push constant 0
eq
not
not
if-goto L5
if-goto Main_L5
push constant 8000
push local 1
add
push constant 1
call Memory.poke 2
pop temp 0
goto L4
label L5
goto Main_L4
label Main_L5
push constant 8000
push local 1
add
push constant 0
call Memory.poke 2
pop temp 0
label L4
goto L2
label L3
label Main_L4
goto Main_L2
label Main_L3
push constant 0
pop local 2
label L2
goto L0
label L1
label Main_L2
goto Main_L0
label Main_L1
push constant 0
return
function Main.nextMask 0
push argument 0
push constant 0
eq
not
if-goto L7
if-goto Main_L7
push constant 1
return
goto L6
label L7
goto Main_L6
label Main_L7
push argument 0
push constant 2
call Math.multiply 2
return
label L6
label Main_L6
function Main.fillMemory 0
label L8
label Main_L8
push argument 1
push constant 0
gt
not
if-goto L9
if-goto Main_L9
push argument 0
push argument 2
call Memory.poke 2
Expand All @@ -728,7 +728,7 @@ label L8
push constant 1
add
pop argument 0
goto L8
label L9
goto Main_L8
label Main_L9
push constant 0
return`;
Loading

0 comments on commit abcdfa9

Please sign in to comment.