*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
+
#include <ao_int64.h>
#include <ao_int64.c>
#include <stdio.h>
c = ao_cast64(&ao_r); \
if (c != r) { \
printf ("trial %4d: %lld " #func mod " %lld = %lld (should be %lld)\n", \
- trial, (int64_t) (a), (int64_t) b, c, r); \
+ trial, (long long) (a), (long long) b, (long long) c, (long long) r); \
++errors; \
} \
} while (0)
test_a(+, ao_plus64, a, b, &ao_a, &ao_b);
test_b(+, ao_plus64, a, b, &ao_a, &ao_b);
test_x(+, ao_plus64, a, b, &ao_a, &ao_b);
+ test(-, ao_minus64, a, b, &ao_a, &ao_b);
+ test_a(-, ao_minus64, a, b, &ao_a, &ao_b);
+ test_b(-, ao_minus64, a, b, &ao_a, &ao_b);
+ test_x(-, ao_minus64, a, b, &ao_a, &ao_b);
test(*, ao_mul64_32_32,(int64_t) (int32_t) a, (int32_t) b, (int32_t) a, (int32_t) b);
test(*, ao_mul64, a, b, &ao_a, &ao_b);
test_a(*, ao_mul64, a, b, &ao_a, &ao_b);