core: fix Long_copy

This commit is contained in:
Joel Kaasinen 2018-12-09 18:07:19 +02:00
parent 30b9ffbde6
commit 454e1e68be
2 changed files with 5 additions and 2 deletions

View File

@ -25,7 +25,7 @@ long Long_bit_MINUS_or(long x, long y) { return x | y; }
long Long_bit_MINUS_xor(long x, long y) { return x ^ y; }
long Long_bit_MINUS_not(long x) { return ~x; }
int Long_copy(long *x) { return *x; }
long Long_copy(long *x) { return *x; }
long Long_mod(long x, long divider) {
return x % divider;
@ -46,4 +46,3 @@ int Long_to_MINUS_int(long a) {
long Long_from_MINUS_int(int a) {
return (long) a;
}

View File

@ -3,6 +3,10 @@
(use-all Long Test)
(deftest test
(assert-equal test
21474836470l
@&21474836470l
"copy works as expected")
(assert-equal test
1l
(min 1l 2l)