Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Jan 26, 2024
2 parents 193c051 + 0420855 commit 2d5a46e
Showing 1 changed file with 114 additions and 0 deletions.
114 changes: 114 additions & 0 deletions eo-runtime/src/test/eo/org/eolang/bool-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,117 @@
x.write (x.as-int.plus 1)
x
FALSE

[] > iterating-tuple-with-while-using-internal-iterator
* 1 1 1 1 > arr
memory 0 > iter
memory 0 > acc
arr.length.minus 1 > max
seq > @
*
if.
max.eq 0
acc.write
acc.as-int.plus
arr.at 0
while.
iter.as-int.lt max
[i]
seq > @
*
acc.write
acc.as-int.plus
arr.at
i
iter.write
iter.as-int.plus 1
eq.
acc.as-int
arr.length

# @todo #2785:60min Enable this test. For some reason this test fails. The only difference between
# this test and `iterating-tuple-with-while-using-internal-iterator` is that this test uses
# external iterator inside instead of standard `i` from `while` body.
[] > iterating-tuple-with-while-using-external-iterator
* 1 1 1 1 > arr
memory 0 > iter
memory 0 > acc
arr.length.minus 1 > max
seq > nop
*
if.
max.eq 0
acc.write
acc.as-int.plus
arr.at 0
while.
iter.as-int.lt max
[i]
seq > @
*
acc.write
acc.as-int.plus
arr.at
iter.as-int
iter.write
iter.as-int.plus 1
eq.
acc.as-int
arr.length
TRUE > @

[] > iterating-tuple-with-while-without-body-multiple
* 1 1 1 1 > arr
memory 0 > iter
memory 0 > acc
arr.length > max
seq > @
*
while.
[]
if. > @
iter.as-int.lt max
seq
*
acc.write
acc.as-int.plus
arr.at
iter.as-int
iter.write
iter.as-int.plus 1
TRUE
FALSE
nop
eq.
acc.as-int
arr.length

# @todo #2437:60min Enable the test. For some reason this test fails. The only difference between
# this test and `iterating-tuple-with-while-without-body-multiple` is that in this test tuple
# consists of only one element.
[] > iterating-tuple-with-while-without-body-single
* 1 > arr
memory 0 > iter
memory 0 > acc
arr.length > max
seq > nop
*
while.
[]
if. > @
iter.as-int.lt max
seq
*
acc.write
acc.as-int.plus
arr.at
iter.as-int
iter.write
iter.as-int.plus 1
TRUE
FALSE
nop
eq.
acc.as-int
arr.length
TRUE > @

2 comments on commit 2d5a46e

@0pdd
Copy link

@0pdd 0pdd commented on 2d5a46e Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2785-8797cda9 discovered in eo-runtime/src/test/eo/org/eolang/bool-tests.eo) and submitted as #2818. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

@0pdd
Copy link

@0pdd 0pdd commented on 2d5a46e Jan 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 2437-a4438d7a discovered in eo-runtime/src/test/eo/org/eolang/bool-tests.eo) and submitted as #2819. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.