diff options
Diffstat (limited to 'testes')
-rw-r--r-- | testes/code.lua | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/testes/code.lua b/testes/code.lua index 34b04668..1f971cd7 100644 --- a/testes/code.lua +++ b/testes/code.lua | |||
@@ -392,28 +392,6 @@ check(function (a, b) | |||
392 | end, | 392 | end, |
393 | 'TEST', 'JMP', 'TEST', 'JMP', 'ADDI', 'MMBINI', 'JMP', 'RETURN0') | 393 | 'TEST', 'JMP', 'TEST', 'JMP', 'ADDI', 'MMBINI', 'JMP', 'RETURN0') |
394 | 394 | ||
395 | checkequal( | ||
396 | function (a) while a < 10 do a = a + 1 end end, | ||
397 | function (a) | ||
398 | ::loop:: | ||
399 | if not (a < 10) then goto exit end | ||
400 | a = a + 1 | ||
401 | goto loop | ||
402 | ::exit:: | ||
403 | end | ||
404 | ) | ||
405 | |||
406 | checkequal( | ||
407 | function (a) repeat local x = a + 1; a = x until a > 0 end, | ||
408 | function (a) | ||
409 | ::loop:: do | ||
410 | local x = a + 1 | ||
411 | a = x | ||
412 | end | ||
413 | if not (a > 0) then goto loop end | ||
414 | end | ||
415 | ) | ||
416 | |||
417 | checkequal(function () return 6 or true or nil end, | 395 | checkequal(function () return 6 or true or nil end, |
418 | function () return k6 or kTrue or kNil end) | 396 | function () return k6 or kTrue or kNil end) |
419 | 397 | ||