Changeset 439 for EcnlProtoTool/trunk/mruby-2.1.1/test/t/lang.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/lang.rb
r331 r439 9 9 # For example, the following mruby code: 10 10 # 11 # if i > 0 and i < 10 then11 # if i > 0 and i < 10 12 12 # 13 13 # compiles to the following byte code: … … 28 28 assert('and', '11.2.3') do 29 29 a = 1 30 if a > 0 and a < 10 then30 if a > 0 and a < 10 31 31 b = 1 32 32 else … … 35 35 assert_equal 1, b 36 36 37 if a < 0 and a < 10 then37 if a < 0 and a < 10 38 38 b = 1 39 39 else … … 42 42 assert_equal 0, b 43 43 44 if a < 0 and a > 10 then44 if a < 0 and a > 10 45 45 b = 1 46 46 else … … 52 52 assert('or','11.2.4') do 53 53 a = 1 54 if a > 0 or a < 10 then54 if a > 0 or a < 10 55 55 b = 1 56 56 else … … 59 59 assert_equal 1, b 60 60 61 if a < 0 or a < 10 then61 if a < 0 or a < 10 62 62 b = 1 63 63 else … … 66 66 assert_equal 1, b 67 67 68 if a < 0 or a > 10 then68 if a < 0 or a > 10 69 69 b = 1 70 70 else
Note:
See TracChangeset
for help on using the changeset viewer.