fix _short' and other non-
_int' integer types, and add `_intptr' test
This commit is contained in:
parent
1203a89a0f
commit
6e23fcda5f
|
@ -47,7 +47,7 @@
|
|||
|
||||
;; utility for the next few definitions
|
||||
(define (sizeof->3ints c-type)
|
||||
(case (compiler-sizeof 'int)
|
||||
(case (compiler-sizeof c-type)
|
||||
[(2) (values _int16 _uint16 _int16)]
|
||||
[(4) (values _int32 _uint32 _int32)]
|
||||
[(8) (values _int64 _uint64 _int64)]
|
||||
|
|
|
@ -234,6 +234,11 @@
|
|||
(test 1 ptr-ref v _int16 0)
|
||||
(test 3 ptr-ref v _int16 3))
|
||||
|
||||
;; Test intptr:
|
||||
(let ([v (malloc _pointer)])
|
||||
(ptr-set! v _pointer (ptr-add #f 107))
|
||||
(test 107 ptr-ref v _intptr))
|
||||
|
||||
(delete-test-files)
|
||||
|
||||
(report-errs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user