summaryrefslogtreecommitdiffhomepage
path: root/test
AgeCommit message (Collapse)Author
2015-05-15Use `mrb_funcall` instead of `mrb_load_string` in test driver.take_cheeze
Related to #2760.
2015-05-07fix splat without assignment; fix #2781cremno
The parser generates NODE_NIL for tSTAR without argument in masgns. The codegen didn't handle that.
2015-04-17Fix to avoid warningMiura Hideki
2015-04-17Add test of negative arguments for Integer#%Miura Hideki
2015-02-24Fix a bug that no expression case doesn't return valid valueKouhei Sutou
Here is a script that reproduces this problem: x = case when true; 1 end p x # => main # 1 is expected
2015-02-24Fix a bug that if and no return value case can't return true clause valueKouhei Sutou
Here is a script that reproduce this problem: x = if true 1 else case 2 when 3 end 4 end p x # => nil # 1 is expected
2015-02-05Fix ensure with yield context on break and returnKouhei Sutou
How to reproduce: class A def x yield ensure y end def y end end # Work A.new.x do end # Not work # trace: # [2] /tmp/a.rb:5:in A.x # [0] /tmp/a.rb:15 # /tmp/a.rb:5: undefined method 'y' for main (NoMethodError) A.new.x do break end # trace: # [2] /tmp/a.rb:5:in A.call # [0] /tmp/a.rb:19 # /tmp/a.rb:5: undefined method 'y' for main (NoMethodError) lambda do A.new.x do return end end.call `self` in ensure is broken when yield and break/return are used.
2015-01-03Round execution timeDaniel Bovensiepen
2014-12-23Fix splat and multiple assignmentsKouhei Sutou
Case1: From variable Code: a = [1, 2, 3, 4, 5] b, c, *d = a p [a, b, c, d] Before: [[1, 2, 3, 4, 5], 1, 2, []] After: [[1, 2, 3, 4, 5], 1, 2, [3, 4, 5]] Ruby: [[1, 2, 3, 4, 5], 1, 2, [3, 4, 5]] Case2: From variables Code: a = [1, 2, 3] b = [4, 5, 6, 7] c, d, *e, f, g = *a, *b p [a, b, c, d, e, f, g] Before: [[1, 2, 3], [4, 5, 6, 7], 1, 2, [], 6, 7] After: [[1, 2, 3], [4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7] Ruby: [[1, 2, 3], [4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7] Case 3: "for" Code: a = [1, 2, 3, 4, 5, 6, 7] for b, c, *d, e, f in [a] do p [a, b, c, d, e, f] end Before: [[1, 2, 3, 4, 5, 6, 7], 1, 2, [], nil, nil] After: [[1, 2, 3, 4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7] Ruby: [[1, 2, 3, 4, 5, 6, 7], 1, 2, [3, 4, 5], 6, 7]
2014-12-17String#[] should reject nil indexh2so5
2014-11-27add multiple assignment decomposition testYukihiro "Matz" Matsumoto
2014-11-26fix(String) String#[] accepts float; close #2650 #2651Robert Mosolgo
2014-10-20instance_methods etc should not include undef'ed method names; based on a ↵Yukihiro "Matz" Matsumoto
patch from @cremno; fix #2613
2014-08-25Add test for Numeric#pow.Tatsuhiko Kubo
2014-08-20Remove empty lines.Tatsuhiko Kubo
2014-08-20Fix error handlings for mrb_open_core().Tatsuhiko Kubo
2014-08-09Fix a bug that class variable can't be referenced from class methodKouhei Sutou
Class method defined in singleton class should be evaluated in class context not singleton class context. fix #2515
2014-07-26Merge pull request #2478 from dreamedge/add_module_functionYukihiro "Matz" Matsumoto
add Module#module_function
2014-07-23Fix memory leak for test driverksss
2014-07-19Print backtrace of crashed test in verbose mode.take_cheeze
2014-07-18add Module#module_functiondreamedge
2014-07-14Set `$mrbtest_verbose` flag in `mrb_init_test_driver`.take_cheeze
2014-07-12Fix rake failure since `mrbtest_objs` isn't flattened.take_cheeze
Append generated test object to `@test_objs` of mrbgem spec. Add method `custom_test_init?` to check whether mrbgem has custom test init function.
2014-07-12Run mrbgem and core tests on minimum dependencies.take_cheeze
Solves #2355. In test drivers: * Uses `mrb_t_pass_result` to check and pass test result to main `mrb_state`. * Adds `mrb_init_test_driver` to init test `mrb_state`.
2014-07-09remove unused return_valueYukihiro "Matz" Matsumoto
2014-07-08Use `mrb_print_error` to print exception instead of `mrb_p`.take_cheeze
2014-07-08Print error instead of printing return value of report.take_cheeze
2014-06-19fix conflict resolution mistakeYukihiro "Matz" Matsumoto
2014-06-18resolve conflictYukihiro "Matz" Matsumoto
2014-06-18remove superclass test for classes that do not exist in mruby (core)Yukihiro "Matz" Matsumoto
2014-06-15Test all ISO defined classes direct superclass except `Object` class.take_cheeze
Move mrbgems ISO direct superclass test to `superclass.rb`. Skips test if class isn't defined. Close #2332.
2014-06-15Move direct superclass checking to `test/t/superclass.rb`.take_cheeze
2014-06-11str_replace: self should not be shared and nofreeksss
2014-06-07move String#clear to mruby-string-ext; ref #2370Yukihiro "Matz" Matsumoto
2014-06-07Implement String#clearJun Hiroe
2014-06-04Add generator script to dependency so that it will regenerate C codes when ↵take_cheeze
it's modified.
2014-06-02Implement `NoMethodError#args`.take_cheeze
2014-06-01remove part of 9cd71916 test for same reason as 5306e47Yukihiro "Matz" Matsumoto
2014-05-25Merge pull request #2320 from yui-knk/test-enumerableYukihiro "Matz" Matsumoto
Replace assert_true with assert_equal.
2014-05-25Merge pull request #2316 from ksss/test-exceptionYukihiro "Matz" Matsumoto
Exception#exception fix test
2014-05-25Merge pull request #2315 from suzukaze/fix-test-procYukihiro "Matz" Matsumoto
Fix assert_equal argument order in test/t/proc.rb
2014-05-25Replace assert_true with assert_equal.yui-knk
2014-05-25Change to use assert method.yui-knk
2014-05-25fix typo.yui-knk
2014-05-25Exception#exception fix testksss
Exception.exception is not call Exception#exception. Test for Exception#exception should call Exception#exception method.
2014-05-25Fix assert_equal argument order in test/t/proc.rbJun Hiroe
2014-05-22Merge pull request #2304 from ksss/class-newYukihiro "Matz" Matsumoto
Class.new do not call `class_eval'
2014-05-22Class.new add test caseksss
2014-05-21Module#initialize set created objectksss
for block argument
2014-05-20Correct comment in exception test.yui-knk