Blame src/functional/strtod_long.c

nsz 462b4f
#include <stdio.h>
nsz 462b4f
#include <stdlib.h>
nsz 462b4f
#include <string.h>
nsz 462b4f
#include "test.h"
nsz 462b4f
nsz 462b4f
int main(void)
nsz 462b4f
{
nsz 462b4f
	double x, want = .1111111111111111111111;
nsz 462b4f
	char buf[40000];
nsz 462b4f
nsz 462b4f
	memset(buf, '1', sizeof buf);
nsz 462b4f
	buf[0] = '.';
nsz 462b4f
	buf[sizeof buf - 1] = 0;
nsz 462b4f
nsz 462b4f
	if ((x=strtod(buf, 0)) != want)
Szabolcs Nagy cfa23c
		t_error("strtod(.11[...]1) got %a want %a\n", x, want);
Szabolcs Nagy cfa23c
	return t_status;
nsz 462b4f
}
nsz 462b4f