lib/msun/tests: Remove newlines in ATF msgs
This fixes broken test reports with the following message: lib/msun/fe_round_test:fe_round -> broken: Test result contains multiple lines: expected_failure: /usr/src/contrib/netbsd-tests/lib/libm/t_fe_round.c:95: Didn't get the same rounding mode out!<<NEWLINE>>(index 0) fed in 64 rounding mode, got 0 out<<NEWLINE>> [0.079s] Signed-off-by: Siva Mahadevan <me@svmhdvn.name> MFC after: 3 days Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1871
This commit is contained in:
committed by
Li-Wen Hsu
parent
d03c9b8f66
commit
ec640742e3
@@ -80,15 +80,15 @@ ATF_TC_BODY(fe_round, tc)
|
||||
received = lrint(values[i].input);
|
||||
ATF_CHECK_MSG(
|
||||
(labs(received - values[i].expected) < EPSILON),
|
||||
"lrint rounding wrong, difference too large\n"
|
||||
"input: %f (index %d): got %ld, expected %ld\n",
|
||||
"lrint rounding wrong, difference too large. "
|
||||
"input: %f (index %d): got %ld, expected %ld",
|
||||
values[i].input, i, received, values[i].expected);
|
||||
|
||||
/* Do we get the same rounding mode out? */
|
||||
ATF_CHECK_MSG(
|
||||
(fegetround() == values[i].round_mode),
|
||||
"Didn't get the same rounding mode out!\n"
|
||||
"(index %d) fed in %d rounding mode, got %d out\n",
|
||||
"Didn't get the same rounding mode out!. "
|
||||
"(index %d) fed in %d rounding mode, got %d out",
|
||||
i, values[i].round_mode, fegetround());
|
||||
}
|
||||
}
|
||||
@@ -109,15 +109,15 @@ ATF_TC_BODY(fe_nearbyint, tc)
|
||||
received = nearbyint(values[i].input);
|
||||
ATF_CHECK_MSG(
|
||||
(fabs(received - values[i].expected) < EPSILON),
|
||||
"nearbyint rounding wrong, difference too large\n"
|
||||
"input: %f (index %d): got %f, expected %ld\n",
|
||||
"nearbyint rounding wrong, difference too large. "
|
||||
"input: %f (index %d): got %f, expected %ld",
|
||||
values[i].input, i, received, values[i].expected);
|
||||
|
||||
/* Do we get the same rounding mode out? */
|
||||
ATF_CHECK_MSG(
|
||||
(fegetround() == values[i].round_mode),
|
||||
"Didn't get the same rounding mode out!\n"
|
||||
"(index %d) fed in %d rounding mode, got %d out\n",
|
||||
"Didn't get the same rounding mode out! "
|
||||
"(index %d) fed in %d rounding mode, got %d out",
|
||||
i, values[i].round_mode, fegetround());
|
||||
}
|
||||
}
|
||||
@@ -151,8 +151,8 @@ ATF_TC_BODY(fe_nextafter, tc)
|
||||
}
|
||||
ATF_CHECK_MSG(
|
||||
res && (fabs(received - values2[i].expected) < EPSILON),
|
||||
"nextafter() rounding wrong, difference too large\n"
|
||||
"input: %f (index %d): got %f, expected %f, res %d\n",
|
||||
"nextafter() rounding wrong, difference too large. "
|
||||
"input: %f (index %d): got %f, expected %f, res %d",
|
||||
values2[i].input, i, received, values2[i].expected, res);
|
||||
}
|
||||
}
|
||||
@@ -177,8 +177,8 @@ ATF_TC_BODY(fe_nexttoward, tc)
|
||||
}
|
||||
ATF_CHECK_MSG(
|
||||
res && (fabs(received - values2[i].expected) < EPSILON),
|
||||
"nexttoward() rounding wrong, difference too large\n"
|
||||
"input: %f (index %d): got %f, expected %f, res %d\n",
|
||||
"nexttoward() rounding wrong, difference too large. "
|
||||
"input: %f (index %d): got %f, expected %f, res %d",
|
||||
values2[i].input, i, received, values2[i].expected, res);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
CHECK_FP_EXCEPTIONS_MSG(0, ALL_STD_EXCEPT, \
|
||||
#func "(%.20Lg, %.20Lg) rmode%d", (x), (y), rmode); \
|
||||
ATF_CHECK_MSG(fpequal_cs(__result, (expected), true), \
|
||||
#func "(%.20Lg, %.20Lg) rmode%d = %.20Lg, expected %.20Lg\n", \
|
||||
#func "(%.20Lg, %.20Lg) rmode%d = %.20Lg, expected %.20Lg", \
|
||||
(x), (y), rmode, __result, (expected)); \
|
||||
} while (0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user