Skip to content

Commit

Permalink
NUMBERS-188 refactored condition methods in test classes
Browse files Browse the repository at this point in the history
  • Loading branch information
sumanth-rajkumar committed Jul 22, 2022
1 parent abc0ed8 commit 66e57ff
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public final class ComplexFunctions {
private static final double PI_OVER_4 = 0.25 * Math.PI;
/** Natural logarithm of 2 (ln(2)). */
private static final double LN_2 = Math.log(2);
/** Base 10 logarithm of e divided by 2 */
/** Base 10 logarithm of e divided by 2. */
private static final double LOG_10E_O_2 = Math.log10(Math.E) / 2;
/** Base 10 logarithm of 2 (log10(2)). */
private static final double LOG10_2 = Math.log10(2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ private static void assertAbs(double expected, Complex z) {
final double actual = TestUtils.assertSame(z, "abs", Complex::abs, ComplexFunctions::abs);
Assertions.assertEquals(expected, actual);
}

/**
* Creates a sub-normal number with up to 52-bits in the mantissa. The number of bits
* to drop must be in the range [0, 51].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ private static void assertAbs(double expected, Complex input) {
final double actual = TestUtils.assertSame(input, "abs", Complex::abs, ComplexFunctions::abs);
Assertions.assertEquals(expected, actual);
}

/**
* Test standard values
*/
Expand Down Expand Up @@ -444,7 +444,7 @@ private static void assertNumberType(double real, double imaginary, NumberType t
final Complex z = Complex.ofCartesian(real, imaginary);
final boolean isNaN = TestUtils.assertSame(z, "NaN", Complex::isNaN, ComplexFunctions::isNaN);
final boolean isInfinite = TestUtils.assertSame(z, "Inf", Complex::isInfinite, ComplexFunctions::isInfinite);
final boolean isFinite = TestUtils.assertSame(z, "Fin", Complex::isFinite, ComplexFunctions::isFinite);;
final boolean isFinite = TestUtils.assertSame(z, "Fin", Complex::isFinite, ComplexFunctions::isFinite);
// A number can be only one
int count = isNaN ? 1 : 0;
count += isInfinite ? 1 : 0;
Expand Down

0 comments on commit 66e57ff

Please sign in to comment.