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

« back to all changes in this revision

Viewing changes to testsuite/array_qualifier-test.scm

  • Committer: Bazaar Package Importer
  • Author(s): NIIBE Yutaka
  • Date: 2008-04-07 09:15:03 UTC
  • Revision ID: james.westby@ubuntu.com-20080407091503-wu0h414koe95kj4i
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;;;
 
2
;;; Test array qualifier (C99)
 
3
;;; 
 
4
 
 
5
(use gauche.test)
 
6
 
 
7
(test-start "array_qualifier")
 
8
(use c-wrapper)
 
9
(test-module 'c-wrapper)
 
10
 
 
11
(c-include "./array_qualifier.h")
 
12
 
 
13
(test "static"
 
14
      (list (ptr <c-int>))
 
15
      (lambda ()
 
16
        (let ((a (make (c-struct 'foo))))
 
17
          (slot-ref (class-of (ref a 'f1)) 'arg-types))))
 
18
 
 
19
(test "restrict"
 
20
      (list (ptr <c-int>))
 
21
      (lambda ()
 
22
        (let ((a (make (c-struct 'foo))))
 
23
          (slot-ref (class-of (ref a 'f2)) 'arg-types))))
 
24
 
 
25
(test "const"
 
26
      (list (ptr <c-int>))
 
27
      (lambda ()
 
28
        (let ((a (make (c-struct 'foo))))
 
29
          (slot-ref (class-of (ref a 'f3)) 'arg-types))))
 
30
 
 
31
(test "volatile"
 
32
      (list (ptr <c-int>))
 
33
      (lambda ()
 
34
        (let ((a (make (c-struct 'foo))))
 
35
          (slot-ref (class-of (ref a 'f4)) 'arg-types))))
 
36
 
 
37
;; epilogue
 
38
(test-end)
 
39