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

Function test_da

strings/decimal.c:2785–2798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2783}
2784
2785void test_da(const char *s1, const char *s2, const char *orig, int ex)
2786{
2787 char s[100], *end;
2788 int res;
2789 snprintf(s, sizeof(s), "'%s' + '%s'", s1, s2);
2790 end= strend(s1);
2791 string2decimal(s1, &a, &end);
2792 end= strend(s2);
2793 string2decimal(s2, &b, &end);
2794 res=decimal_add(&a, &b, &c);
2795 printf("%-40s => res=%d ", s, res);
2796 print_decimal(&c, orig, res, ex);
2797 printf("\n");
2798}
2799
2800void test_ds(const char *s1, const char *s2, const char *orig, int ex)
2801{

Callers 1

mainFunction · 0.85

Calls 3

strendFunction · 0.85
decimal_addFunction · 0.85
print_decimalFunction · 0.70

Tested by

no test coverage detected