aboutsummaryrefslogtreecommitdiff
path: root/testes/code.lua
diff options
context:
space:
mode:
Diffstat (limited to 'testes/code.lua')
-rw-r--r--testes/code.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/testes/code.lua b/testes/code.lua
index 543743fc..bd4b10d0 100644
--- a/testes/code.lua
+++ b/testes/code.lua
@@ -86,7 +86,7 @@ checkKlist(foo, {1, 1.0, 2, 2.0, 0, 0.0})
86-- testing opcodes 86-- testing opcodes
87 87
88-- check that 'f' opcodes match '...' 88-- check that 'f' opcodes match '...'
89function check (f, ...) 89local function check (f, ...)
90 local arg = {...} 90 local arg = {...}
91 local c = T.listcode(f) 91 local c = T.listcode(f)
92 for i=1, #arg do 92 for i=1, #arg do
@@ -99,7 +99,7 @@ end
99 99
100 100
101-- check that 'f' opcodes match '...' and that 'f(p) == r'. 101-- check that 'f' opcodes match '...' and that 'f(p) == r'.
102function checkR (f, p, r, ...) 102local function checkR (f, p, r, ...)
103 local r1 = f(p) 103 local r1 = f(p)
104 assert(r == r1 and math.type(r) == math.type(r1)) 104 assert(r == r1 and math.type(r) == math.type(r1))
105 check(f, ...) 105 check(f, ...)
@@ -107,7 +107,7 @@ end
107 107
108 108
109-- check that 'a' and 'b' has the same opcodes 109-- check that 'a' and 'b' has the same opcodes
110function checkequal (a, b) 110local function checkequal (a, b)
111 a = T.listcode(a) 111 a = T.listcode(a)
112 b = T.listcode(b) 112 b = T.listcode(b)
113 assert(#a == #b) 113 assert(#a == #b)