| 2846 | } |
| 2847 | |
| 2848 | void 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 | |
| 2867 | void test_md(const char *s1, const char *s2, const char *orig, int ex) |
| 2868 | { |
no test coverage detected