mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
test/t/codegen.rb: test 127 arguments with break not next
In addition, avoid using undefined constant `A` because it terminates actual execution by `NameError`.
This commit is contained in:
+5
-6
@@ -56,12 +56,11 @@ assert('undef with 127 or more arguments') do
|
||||
end
|
||||
end
|
||||
|
||||
assert('next in normal loop with 127 arguments') do
|
||||
assert_raise NameError do
|
||||
while true
|
||||
next A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A,A
|
||||
end
|
||||
end
|
||||
assert('break in normal loop with 127 arguments') do
|
||||
assert_equal 127,
|
||||
1.times{
|
||||
break 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
|
||||
}.size
|
||||
end
|
||||
|
||||
assert('negate literal register alignment') do
|
||||
|
||||
Reference in New Issue
Block a user