Skip to content

Commit

Permalink
improve cov
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroflag committed Feb 25, 2025
1 parent 47a93ac commit bad9994
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 0 additions & 4 deletions src/ast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ function ast.pop3rd()
return {name = "stack_consume", op = "pop3rd"}
end

function ast.stack_peek(operation)
return {name = "stack_peek", op = operation}
end

function ast.stack_op(operation)
return {name = "stack_op", op = operation}
end
Expand Down
6 changes: 1 addition & 5 deletions src/equinox_bundle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ function ast.pop3rd()
return {name = "stack_consume", op = "pop3rd"}
end

function ast.stack_peek(operation)
return {name = "stack_peek", op = operation}
end

function ast.stack_op(operation)
return {name = "stack_op", op = operation}
end
Expand Down Expand Up @@ -3231,7 +3227,7 @@ return utils
end
end

__VERSION__="0.1-351"
__VERSION__="0.1-356"

local Compiler = require("compiler")
local Optimizer = require("ast_optimizer")
Expand Down
2 changes: 1 addition & 1 deletion src/version/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1-351
0.1-356
2 changes: 2 additions & 0 deletions tests/test_core.eqx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ depth 0 =assert

1 2 >a 3 a> - - 0 =assert

nil >a a> nil =assert

2 8 pow 256 =assert

10 20
Expand Down
1 change: 1 addition & 0 deletions tests/test_luacall.eqx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ adepth 0 =assert
502 1002 #( math.min 2 ) 502 =assert

math.pi #( math.cos 1 ) -1 =assert
math $pi @ #( math.cos 1 ) -1 =assert

"55" #( tonumber 1 ) 55 =assert
16 #( math.sqrt 1 ) 4 =assert
Expand Down
5 changes: 5 additions & 0 deletions tests/test_stack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ assert(pop() == 3)
assert(pop() == 2)
assert(pop() == 1)

push_many(nil, 2)
assert(depth() == 2)
assert(pop() == 2)
assert(pop() == nil)

function multi_return()
return 4, 5
end
Expand Down

0 comments on commit bad9994

Please sign in to comment.