Changeset 439 for EcnlProtoTool/trunk/mruby-2.1.1/test/t/enumerable.rb
- Timestamp:
- Jul 9, 2020, 8:51:43 AM (4 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-2.1.1
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-2.1.1/test/t/enumerable.rb
r321 r439 46 46 assert('Enumerable#detect', '15.3.2.2.4') do 47 47 assert_equal 1, [1,2,3].detect() { true } 48 assert_equal 'a', [1,2,3].detect( "a") { false }48 assert_equal 'a', [1,2,3].detect(->{"a"}) { false } 49 49 end 50 50 … … 65 65 assert('Enumerable#find', '15.3.2.2.7') do 66 66 assert_equal 1, [1,2,3].find() { true } 67 assert_equal 'a', [1,2,3].find( "a") { false }67 assert_equal 'a', [1,2,3].find(->{"a"}) { false } 68 68 end 69 69 70 70 assert('Enumerable#find_all', '15.3.2.2.8') do 71 assert_ true [1,2,3,4,5,6,7,8,9].find_all() {|i| i%2 == 0}, [2,4,6,8]71 assert_equal [2,4,6,8], [1,2,3,4,5,6,7,8,9].find_all() {|i| i%2 == 0} 72 72 end 73 73
Note:
See TracChangeset
for help on using the changeset viewer.