Skip to content

Commit

Permalink
fix(#3013): fixed float.lt
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Mar 30, 2024
1 parent dc621e3 commit ae76091
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 37 deletions.
2 changes: 1 addition & 1 deletion eo-runtime/src/main/eo/org/eolang/float.eo
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
[x] > lt
0.0.gt > @
^.minus
int
float
x > value!

# Tests that $ ≤ x.
Expand Down
30 changes: 14 additions & 16 deletions eo-runtime/src/test/eo/org/eolang/float-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -27,83 +27,81 @@
+version 0.0.0

# Test.
[] > less-true
eq. > @
-10.5.lt 50.3
TRUE
[] > float-less-true
-10.5.lt 50.3 > @

# Test.
[] > less-equal
[] > float-less-equal
eq. > @
-10.7.lt -10.7
FALSE

# Test.
[] > less-false
[] > float-less-false
eq. > @
10.13.lt -5.3
FALSE

# Test.
[] > greater-true
[] > float-greater-true
gt. > @
-200.1
-1000.0

# Test.
[] > greater-false
[] > float-greater-false
eq. > @
0.5.gt 100.1
FALSE

# Test.
[] > greater-equal
[] > float-greater-equal
eq. > @
0.7.gt 0.7
FALSE

# Test.
[] > leq-true
[] > float-leq-true
eq. > @
lte.
-200.5
-100.6
TRUE

# Test.
[] > leq-equal
[] > float-leq-equal
eq. > @
lte.
50.1
50.1
TRUE

# Test.
[] > leq-false
[] > float-leq-false
eq. > @
lte.
0.9
-10.11
FALSE

# Test.
[] > gte-true
[] > float-gte-true
eq. > @
gte.
-1000.1
-1100.1
TRUE

# Test.
[] > gte-equal
[] > float-gte-equal
eq. > @
gte.
113.333
113.333
TRUE

# Test.
[] > gte-false
[] > float-gte-false
eq. > @
gte.
0.7
Expand Down Expand Up @@ -135,7 +133,7 @@
FALSE

# Test.
[] > zero-eq-to-zero
[] > float-zero-eq-to-zero
eq. > @
eq.
0.0
Expand Down
38 changes: 18 additions & 20 deletions eo-runtime/src/test/eo/org/eolang/int-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@
# @todo #2931:30min Enable the test calculates-fibonacci-number-with-recursion. The test was
# disabled because for some reason it executes endlessly. Need to find what's wrong and enable the
# test.
[] > less-true
eq. > @
lt.
10
50
TRUE
[] > int-less-true
lt. > @
10
50

# Test.
[] > less-equal
[] > int-less-equal
eq. > @
not.
lt.
Expand All @@ -47,7 +45,7 @@
TRUE

# Test.
[] > less-false
[] > int-less-false
eq. > @
not.
lt.
Expand All @@ -56,15 +54,15 @@
TRUE

# Test.
[] > greater-true
[] > int-greater-true
eq. > @
gt.
-200
-1000
TRUE

# Test.
[] > greater-false
[] > int-greater-false
eq. > @
not.
gt.
Expand All @@ -73,7 +71,7 @@
TRUE

# Test.
[] > greater-equal
[] > int-greater-equal
eq. > @
not.
gt.
Expand All @@ -82,23 +80,23 @@
TRUE

# Test.
[] > leq-true
[] > int-leq-true
eq. > @
lte.
-200
-100
TRUE

# Test.
[] > leq-equal
[] > int-leq-equal
eq. > @
lte.
50
50
TRUE

# Test.
[] > leq-false
[] > int-leq-false
eq. > @
not.
lte.
Expand All @@ -107,23 +105,23 @@
TRUE

# Test.
[] > gte-true
[] > int-gte-true
eq. > @
gte.
-1000
-1100
TRUE

# Test.
[] > gte-equal
[] > int-gte-equal
eq. > @
gte.
113
113
TRUE

# Test.
[] > gte-false
[] > int-gte-false
eq. > @
not.
gte.
Expand All @@ -148,7 +146,7 @@
TRUE

# Test.
[] > zero-eq-to-zero
[] > int-zero-eq-to-zero
eq. > @
eq.
0
Expand All @@ -164,15 +162,15 @@
TRUE

# Test.
[] > eq-true
[] > int-eq-true
eq. > @
eq.
123
123
TRUE

# Test.
[] > eq-false
[] > int-eq-false
eq. > @
not.
eq.
Expand Down

1 comment on commit ae76091

@0pdd
Copy link

@0pdd 0pdd commented on ae76091 Mar 30, 2024

Choose a reason for hiding this comment

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

Puzzle 2931-606d29f8 disappeared from eo-runtime/src/test/java/EOorg/EOeolang/EOio/EOstdoutTest.java), that's why I closed #3013. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

Please sign in to comment.