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

Function test_dv

strings/decimal.c:2848–2865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2846}
2847
2848void test_dv(const char *s1, const char *s2, const char *orig, int ex)
2849{
2850 char s[100], *end;
2851 int res;
2852 snprintf(s, sizeof(s), "'%s' / '%s'", s1, s2);
2853 end= strend(s1);
2854 string2decimal(s1, &a, &end);
2855 end= strend(s2);
2856 string2decimal(s2, &b, &end);
2857 res=decimal_div(&a, &b, &c, 5);
2858 printf("%-40s => res=%d ", s, res);
2859 check_result_code(res, ex);
2860 if (res == E_DEC_DIV_ZERO)
2861 printf("E_DEC_DIV_ZERO");
2862 else
2863 print_decimal(&c, orig, res, ex);
2864 printf("\n");
2865}
2866
2867void test_md(const char *s1, const char *s2, const char *orig, int ex)
2868{

Callers 1

mainFunction · 0.85

Calls 4

strendFunction · 0.85
decimal_divFunction · 0.85
check_result_codeFunction · 0.85
print_decimalFunction · 0.70

Tested by

no test coverage detected