MCPcopy Create free account
hub / github.com/MariaDB/server / test_d2f

Function test_d2f

strings/decimal.c:2673–2686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2671}
2672
2673void test_d2f(const char *s, int ex)
2674{
2675 char s1[100], *end;
2676 double x;
2677 int res;
2678
2679 snprintf(s1, sizeof(s1), "'%s'", s);
2680 end= strend(s);
2681 string2decimal(s, &a, &end);
2682 res=decimal2double(&a, &x);
2683 if (full) dump_decimal(&a);
2684 printf("%-40s => res=%d %.*g\n", s1, res, a.intg+a.frac, x);
2685 check_result_code(res, ex);
2686}
2687
2688void test_d2b2d(const char *str, int p, int s, const char *orig, int ex)
2689{

Callers 1

mainFunction · 0.85

Calls 4

strendFunction · 0.85
decimal2doubleFunction · 0.85
dump_decimalFunction · 0.85
check_result_codeFunction · 0.85

Tested by

no test coverage detected