mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
2.5-18.1
This commit is contained in:
19
stdlib/tst-atof1.c
Normal file
19
stdlib/tst-atof1.c
Normal file
@ -0,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"
|
Reference in New Issue
Block a user