~ubuntu-branches/ubuntu/karmic/gauche-c-wrapper/karmic

« back to all changes in this revision

Viewing changes to testsuite/ffitest.scm

  • Committer: Bazaar Package Importer
  • Author(s): NIIBE Yutaka
  • Date: 2008-07-16 10:51:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080716105100-18dbutc1scqufbc6
Tags: 0.5.4-2
debian/rules: Supply LDCONFIG for configure (Closes: #490717).
Thanks to Jens Thiele.

NOTE: This workaround should be removed when upstream incorporates
fix to configure.ac.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
(test "dlopen"
25
25
      #f
26
26
      (lambda ()
27
 
        (let ((handle (dlopen DYLIB (with-module c-wrapper RTLD_NOW))))
 
27
        (let ((handle (dlopen DYLIB)))
28
28
          (begin0
29
29
            (null-ptr? handle)
30
30
            (dlclose handle)))))
33
33
(test "dlsym"
34
34
      #f
35
35
      (lambda ()
36
 
        (let* ((handle (dlopen DYLIB (with-module c-wrapper RTLD_NOW)))
 
36
        (let* ((handle (dlopen DYLIB))
37
37
               (ptr (dlsym handle "add_uint")))
38
38
          (begin0
39
39
            (null-ptr? ptr)
42
42
(test "ffi_prep_cif"
43
43
      (with-module c-wrapper FFI_OK)
44
44
      (lambda ()
45
 
        (let* ((handle (dlopen DYLIB (with-module c-wrapper RTLD_NOW)))
 
45
        (let* ((handle (dlopen DYLIB))
46
46
               (fn (dlsym handle "add_uint")))
47
47
          (receive (status cif)
48
48
              (ffi-prep-cif (ffi-type-uint) (list (ffi-type-uint)
54
54
(test "ffi_call"
55
55
      3
56
56
      (lambda ()
57
 
        (let* ((handle (dlopen DYLIB (with-module c-wrapper RTLD_NOW)))
 
57
        (let* ((handle (dlopen DYLIB))
58
58
               (fn (dlsym handle "add_uint"))
59
59
               (rvalue (make <c-uint>))
60
60
               (v1 (make <c-uint>))
73
73
(test "ffi_closure"
74
74
      #t
75
75
      (lambda ()
76
 
        (let* ((handle (dlopen DYLIB (with-module c-wrapper RTLD_NOW)))
 
76
        (let* ((handle (dlopen DYLIB))
77
77
               (fn (dlsym handle "callback")))
78
78
          (receive (status cif)
79
79
              (ffi-prep-cif (ffi-type-sint) (list (ffi-type-sint)
93
93
(test "call callback"
94
94
      5
95
95
      (lambda ()
96
 
        (let* ((handle (dlopen DYLIB (with-module c-wrapper RTLD_NOW)))
 
96
        (let* ((handle (dlopen DYLIB))
97
97
               (fn (dlsym handle "callback_sint"))
98
98
               (v1 (make <c-int>))
99
99
               (v2 (make <c-int>))