Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc make the test more precise.



details:   https://anonhg.NetBSD.org/src/rev/e002eb8fe7aa
branches:  trunk
changeset: 781739:e002eb8fe7aa
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Sep 27 00:37:56 2012 +0000

description:
make the test more precise.

diffstat:

 tests/lib/libc/t_gdtoa.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 81998801d4bb -r e002eb8fe7aa tests/lib/libc/t_gdtoa.c
--- a/tests/lib/libc/t_gdtoa.c  Thu Sep 27 00:37:43 2012 +0000
+++ b/tests/lib/libc/t_gdtoa.c  Thu Sep 27 00:37:56 2012 +0000
@@ -34,7 +34,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_gdtoa.c,v 1.2 2011/06/14 12:17:57 njoly Exp $");
+__RCSID("$NetBSD: t_gdtoa.c,v 1.3 2012/09/27 00:37:56 christos Exp $");
 
 #include <atf-c.h>
 
@@ -53,7 +53,8 @@
 ATF_TC_BODY(long_format, tc)
 {
        char *buf;
-       (void)asprintf(&buf, "%1.262159f", 1.1);
+       ATF_REQUIRE_EQ(262161, asprintf(&buf, "%1.262159f", 1.1));
+       free(buf);
 }
 
 ATF_TP_ADD_TCS(tp)



Home | Main Index | Thread Index | Old Index