9 # DO_TESTS = [:test_46]
11 do_blah <<SRC, "2\n2\n", [178, 477]
12 # test top level if, requires handling of :if in handle_element, other pathways don't hit that for some reason?
24 def test_44_trivial_block_arg
25 do_blah <<SRC, "5\n1\n5\n2\n", [794, 1428]
26 # test trivial block - no complex scopes
41 do_blah <<SRC, "-5\n2\n5\n-5\n2\n5\n", [535, 802]
42 # test scoping - calling a method should push a new lexical pad
56 def test_8_instance_method_calls_self_method
57 do_blah <<SRC, "2\n", [635, 902]
71 def test_12_instance_variable_hooks
72 do_blah <<SRC, "25\n100\n", [1746, 3120]
96 def test_empty_class_def
97 do_blah <<SRC, "2\n", [85, 88]
99 # class can't be empty!
105 def test_1_templates_scopes
106 do_blah <<SRC, nil, [1654, 2041]
107 # useful for testing templated scopes
125 def test_2_simple_yield_instance_method
126 do_blah <<SRC, nil, [1137, 2160]
148 def test_3_trivial_yield
149 do_blah <<SRC, nil, [1486, 3667]
167 def test_4_while_break_yield
168 do_blah <<SRC, nil, [1637, 2487]
188 def test_5_simple_yield
189 do_blah <<SRC, nil, [1098, 2687]
207 def test_6_most_basic_yield
208 do_blah <<SRC, nil, [493, 1099]
221 def test_7_method_calling_method
222 do_blah <<SRC, nil, [384, 574]
236 def test_9_looped_instance_create_and_method_call
237 do_blah <<SRC, nil, [1033, 903]
253 def test_10_trivial_math
254 do_blah <<SRC, nil, [114, 136]
260 def test_11_return_from_instance_method
261 do_blah <<SRC, nil, [525, 1036]
262 # testcase for return values on instance methods
263 # problem was caused as fall through to Def at end of
264 # method happened and the return value was discarded
276 def test_13_dict_get_set
277 do_blah <<SRC, nil, [626, 1040]
295 def test_14_instance_method_calls_kernel_method
296 do_blah <<SRC, nil, [541, 795]
313 def test_15_trivial_while_break
314 do_blah <<SRC, nil, [248, 420]
325 do_blah <<SRC, nil, [744, 1161]
347 def test_18_trivial_yield_simple_scope
348 do_blah <<SRC, nil, [592, 1213]
349 # test trivial yield - no complex scopes
362 do_blah <<SRC, nil, [1130, 2045]
363 # test yielding while loop with a break
382 do_blah <<SRC, nil, [375, 545]
383 # test while loop with a break
395 do_blah <<SRC, nil, [897, 1300]
396 # test iterators in global methods
414 do_blah <<SRC, nil, [847, 1386]
415 # test an implementation of times method
430 do_blah <<SRC, nil, [1564, 2109]
431 # test yielding while loop - while end condition is tested in this one, but not in the above one
449 do_blah <<SRC, nil, [509, 797]
450 # test multiple method definitions with differing prototypes
464 do_blah <<SRC, nil, [705, 1479]
480 do_blah <<SRC, nil, [435, 467]
491 public_instance_methods.each {
493 next if meth !~ /^test.*/ or DO_TESTS.include? meth.to_sym
494 remove_method meth.to_sym
495 } if defined? DO_TESTS