1
(load "li_std_string.so")
5
(if (not (string=? (test-value x) x))
6
(begin (error "Error 1") (exit 1)))
8
(if (not (string=? (test-const-reference x) x))
9
(begin (error "Error 2") (exit 1)))
11
(define y (test-pointer-out))
13
(define z (test-const-pointer-out))
14
(test-const-pointer z)
16
(define a (test-reference-out))
19
;; test global variables
21
(if (not (string=? (GlobalString) "whee"))
23
(if (not (string=? (GlobalString2) "global string 2"))
26
(define struct (make <Structure>))
28
;; MemberString should be a wrapped class
29
(define scl (slot-ref struct 'MemberString))
30
(if (not (string=? (slot-ref scl 'str) ""))
32
(slot-set! scl 'str "and how")
33
(if (not (string=? (slot-ref (slot-ref struct 'MemberString) 'str) "and how"))
35
(if (not (string=? (slot-ref struct 'MemberString2) "member string 2"))
37
(Structure-StaticMemberString "static str")
38
(if (not (string=? (Structure-StaticMemberString) "static str"))
40
(if (not (string=? (Structure-StaticMemberString2) "static member string 2"))
43
;(if (not (string=? (Structure-ConstMemberString-get struct) "const member string"))
45
(if (not (string=? (Structure-ConstStaticMemberString) "const static member string"))