Disabling FFI integer overflow tests on 32-bit systems.

This commit is contained in:
Alex Shinn 2015-01-17 19:06:52 +09:00
parent f1d66c582f
commit 8e4d4889c3

View file

@ -66,10 +66,12 @@ int sub(int x, int y) {
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; More detailed tests on integer conversions and overflow. ;; More detailed tests on integer conversions and overflow.
(test-ffi (cond
"integers" ((fixnum? (expt 2 60))
(begin (test-ffi
(c-declare " "integers"
(begin
(c-declare "
unsigned hoge(unsigned x) { unsigned hoge(unsigned x) {
return x; return x;
} }
@ -89,24 +91,24 @@ enum suuji tasu(enum suuji a, enum suuji b) {
return a + b; return a + b;
} }
") ")
(define-c unsigned hoge (unsigned)) (define-c unsigned hoge (unsigned))
(define-c long poge (long)) (define-c long poge (long))
(define-c unsigned-long piyo (unsigned-long)) (define-c unsigned-long piyo (unsigned-long))
(define-c boolean ponyo (boolean)) (define-c boolean ponyo (boolean))
(define-c-int-type suuji) (define-c-int-type suuji)
(define-c suuji tasu (suuji suuji))) (define-c suuji tasu (suuji suuji)))
;; static cast ;; static cast
(test 4294967295 (hoge -1)) (test 4294967295 (hoge -1))
;; pass and return a signed bignum ;; pass and return a signed bignum
(test -9223372036854775808 (poge (- (expt 2 63)))) (test -9223372036854775808 (poge (- (expt 2 63))))
;; pass and return an unsigned bignum ;; pass and return an unsigned bignum
(test 4611686018427387904 (piyo (expt 2 62))) (test 4611686018427387904 (piyo (expt 2 62)))
;; booleans ;; booleans
(test #f (ponyo 'blah)) (test #f (ponyo 'blah))
(test #t (ponyo #f)) (test #t (ponyo #f))
;; int types ;; int types
(test 5 (tasu 2 3)) (test 5 (tasu 2 3))
) )))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; String passing, returning and mutation. ;; String passing, returning and mutation.