mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-03 19:26:36 +02:00
adding ffi test with unsigned-char param
This commit is contained in:
parent
6a2ed9cdb4
commit
a88a1ad244
1 changed files with 7 additions and 2 deletions
|
@ -63,14 +63,19 @@ int cube(int x) {
|
||||||
int sub(int x, int y) {
|
int sub(int x, int y) {
|
||||||
return x - y;
|
return x - y;
|
||||||
}
|
}
|
||||||
|
int inc(int x, unsigned char y) {
|
||||||
|
return x + y;
|
||||||
|
}
|
||||||
")
|
")
|
||||||
(define-c int zero ())
|
(define-c int zero ())
|
||||||
(define-c int cube (int))
|
(define-c int cube (int))
|
||||||
(define-c int sub (int int)))
|
(define-c int sub (int int))
|
||||||
|
(define-c int inc (int unsigned-char)))
|
||||||
(test 0 (zero))
|
(test 0 (zero))
|
||||||
(test 4 (sub 7 3))
|
(test 4 (sub 7 3))
|
||||||
(test -27 (cube -3))
|
(test -27 (cube -3))
|
||||||
(test -3 (sub (zero) 3)))
|
(test -3 (sub (zero) 3))
|
||||||
|
(test 6 (inc 5 1)))
|
||||||
|
|
||||||
(test-ffi
|
(test-ffi
|
||||||
"params"
|
"params"
|
||||||
|
|
Loading…
Add table
Reference in a new issue