void test_round(dec64 first, dec64 second, dec64 expected, char * comment) { dec64 actual = dec64_round(first, second); judge_binary(first, second, expected, actual, "round", "r", comment); }
void test_subtract(dec64 first, dec64 second, dec64 expected, char * comment) { dec64 actual = dec64_subtract(first, second); judge_binary(first, second, expected, actual, "subtract", "-", comment); }
void test_modulo(dec64 first, dec64 second, dec64 expected, char * comment) { dec64 actual = dec64_modulo(first, second); judge_binary(first, second, expected, actual, "modulo", "%", comment); }
void test_less(dec64 first, dec64 second, dec64 expected, char * comment) { dec64 actual = dec64_less(first, second); judge_binary(first, second, expected, actual, "less", "<", comment); }
void test_integer_divide(dec64 first, dec64 second, dec64 expected, char * comment) { dec64 actual = dec64_integer_divide(first, second); judge_binary(first, second, expected, actual, "integer_divide", "/", comment); }
void judge_communitive(dec64 first, dec64 second, dec64 expected, dec64 actual, char * name, char * op, char * comment) { judge_binary(first, second, expected, actual, name, op, comment); if (first != second) { judge_binary(second, first, expected, actual, name, op, comment); } }
static void test_root(dec64 first, dec64 second, dec64 expected, char * comment) { dec64 actual = dec64_root(first, second); judge_binary(first, second, expected, actual, "root", "|", comment); }