[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r903 - /fsf/trunk/libc/stdlib/tst-atof1.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r903 - /fsf/trunk/libc/stdlib/tst-atof1.c
- From: eglibc@xxxxxxxxxx
- Date: Mon, 11 Dec 2006 08:01:17 -0000
Author: eglibc
Date: Mon Dec 11 00:01:17 2006
New Revision: 903
Log:
Import glibc-mainline for 2006-12-11
Added:
fsf/trunk/libc/stdlib/tst-atof1.c
Added: fsf/trunk/libc/stdlib/tst-atof1.c
==============================================================================
--- fsf/trunk/libc/stdlib/tst-atof1.c (added)
+++ fsf/trunk/libc/stdlib/tst-atof1.c Mon Dec 11 00:01:17 2006
@@ -1,0 +1,19 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+ char buf[100];
+ snprintf (buf, sizeof (buf), "%g", atof ("0x10p-1"));
+ if (strcmp (buf, "8") != 0)
+ {
+ printf ("got \"%s\", expected \"8\"\n", buf);
+ return 1;
+ }
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"