Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Oct 31, 2023
2 parents d2a0cec + a7e7c71 commit 6545c3f
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 56 deletions.
6 changes: 1 addition & 5 deletions .codacy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# @todo #1326:30min Enable only necessary tests. Several checks
# are not available for the project. For example a lot of
# package name contains capital letter and such names are conventional.
exclude_paths:
- "eo-runtime/src/main/java/EOorg/EOeolang/EOrust.java"
- "eo-runtime/src/test/java/EOorg/EOeolang/EOintTest.java"
- "eo-maven-plugin/src/it/hash_package_layer/src/main/java/EOorg/EOeolang/Heaps.java"
- "eo-maven-plugin/src/it/hash_package_layer/src/main/java/EOorg/EOeolang/package-info.java"
exclude_paths:
42 changes: 30 additions & 12 deletions eo-runtime/src/main/eo/org/eolang/float.eo
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,39 @@
[] > float
# Tests that $ = x
[x] > eq
x > value!
x.as-bytes > x-as-bytes!
^.as-bytes > self-as-bytes!
nan.as-bytes > nan-as-bytes!
0.0.as-bytes > pos-zero-as-bytes!
-0.0.as-bytes > neg-zero-as-bytes!
if. > @
and.
or.
eq.
x-as-bytes
nan-as-bytes
eq.
^.as-bytes > self-as-bytes!
00-00-00-00-00-00-00-00 > zero-as-bytes!
self-as-bytes
nan-as-bytes
FALSE
or.
and.
or.
eq.
x-as-bytes
pos-zero-as-bytes
eq.
x-as-bytes
neg-zero-as-bytes
or.
eq.
self-as-bytes
pos-zero-as-bytes
eq.
self-as-bytes
neg-zero-as-bytes
eq.
value.as-bytes > x-as-bytes!
zero-as-bytes
eq.
^.neg.as-bytes
value.neg.as-bytes
eq.
self-as-bytes
x-as-bytes
self-as-bytes
x-as-bytes

# Tests that $ < x
[x] > lt
Expand Down
17 changes: 3 additions & 14 deletions eo-runtime/src/main/eo/org/eolang/int.eo
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,9 @@
[] > int
# Tests that $ = x
[x] > eq
if. > @
and.
eq.
^.as-bytes > self-as-bytes!
00-00-00-00-00-00-00-00 > zero-as-bytes!
eq.
x.as-bytes > x-as-bytes!
zero-as-bytes
eq.
^.neg.as-bytes
x.neg.as-bytes
eq.
self-as-bytes
x-as-bytes
eq. > @
^.as-bytes
x.as-bytes

# Tests that $ < x
[x] > lt
Expand Down
37 changes: 20 additions & 17 deletions eo-runtime/src/test/eo/org/eolang/float-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,15 @@
0.0
TRUE

[] > zero-not-equal-to-neg-zero
[] > zero-equal-to-neg-zero
eq. > @
0.0.eq -0.0
FALSE
TRUE

[] > neg-zero-not-equal-to-zero
[] > neg-zero-equal-to-zero
eq. > @
-0.0.eq 0.0
FALSE
TRUE

[] > zero-not-greater-that-neg-zero
eq. > @
Expand All @@ -155,32 +155,35 @@
-0.0.lt 0.0
FALSE

[] > zero-not-gte-neg-zero
[] > zero-gte-neg-zero
eq. > @
0.0.gte -0.0
FALSE
TRUE

[] > neg-zero-not-gte-zero
[] > neg-zero-gte-zero
eq. > @
-0.0.gte 0.0
FALSE
TRUE

[] > zero-not-lte-neg-zero
[] > zero-lte-neg-zero
eq. > @
0.0.lte -0.0
FALSE
TRUE

[] > neg-zero-not-lte-zero
[] > neg-zero-lte-zero
eq. > @
-0.0.lte 0.0
FALSE
TRUE

[] > float-zero-not-eq-to-int-zero
[] > float-zero-eq-to-int-zero
eq. > @
eq.
0.0
0
FALSE
0.0
0

[] > float-neg-zero-eq-to-int-zero
eq. > @
-0.0
0

[] > eq-true
eq. > @
Expand Down
12 changes: 4 additions & 8 deletions eo-runtime/src/test/eo/org/eolang/int-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,12 @@
0
TRUE

[] > int-zero-not-eq-to-float-zero
[] > int-zero-eq-to-float-zero
eq. > @
eq.
0
0.0
FALSE
TRUE

[] > eq-true
eq. > @
Expand All @@ -176,12 +176,8 @@

[] > compares-two-different-types
eq. > @
not.
eq.
42
"Hello!"
TRUE
"check int.eq.not string"
68.eq "12345678"
FALSE

[] > calculates-fibonacci-number-with-recursion
[n] > fibo
Expand Down

0 comments on commit 6545c3f

Please sign in to comment.