Skip to content

Commit

Permalink
feat(#3251): tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Sep 6, 2024
1 parent c0e69f0 commit c8987cd
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions eo-runtime/src/test/eo/org/eolang/math/integral-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,25 @@
1
10
100
calculates-lineal-integral.close-to > @
close-to > @
quadratic
333
0.0000001

# Checks where given `value` is close to `operand` with given precision `err`.
[value operand err] > close-to
lte. > @
minus.
abs
value.minus operand
err
0
[value] > abs
if. > @
value.gte 0
value
value.neg

# Test.
[] > calculates-cube-integral
as-number. > cube
Expand All @@ -75,7 +89,21 @@
1
10
100
calculates-lineal-integral.close-to > @
close-to > @
cube
2499.75
0.0000001

# Checks where given `value` is close to `operand` with given precision `err`.
[value operand err] > close-to
lte. > @
minus.
abs
value.minus operand
err
0
[value] > abs
if. > @
value.gte 0
value
value.neg

0 comments on commit c8987cd

Please sign in to comment.