@Test public void test10() throws Throwable { Rational rational0 = new Rational(1L, 1L); Rational rational1 = rational0.divide(1L); assertEquals(1.0F, rational0.floatValue(), 0.01F); assertEquals(1L, rational1.longValue()); }
/** * OVERVIEW: The test case "test5" covers around 1.0% (low percentage) of statements in "Rational" */ @Test public void test5() throws Throwable { // The test case instantiates a "Rational" with numerator equal to 1L, // and denominator equal to -4269L. // The execution of this constructor implicitly covers the following 1 // conditions: // - the condition " denominator equals to 0L" is FALSE; Rational rational0 = new Rational(1L, (-4269L)); // The test case declares a long whose value is equal to the long value // of "rational0" long long0 = rational0.longValue(); // Then, it tests: // 1) whether the double value of "rational0" is equal to (-2.3424689622862497E-4) // with delta equal to 0.01D; assertEquals((-2.3424689622862497E-4), rational0.doubleValue(), 0.01D); // 2) whether "long0" is equal to 0L; assertEquals(0L, long0); }
@Test public void test5() throws Throwable { Rational rational0 = new Rational(1L, 1L); long long0 = rational0.longValue(); assertEquals(1L, long0); }