r10563: add module keyword to def-function
[uffi.git] / tests / foreign-var.lisp
index 52bceb159221330f1d5e03eaaaf1f8cb7133da4e..9409eeaf476fc7428c7b8ed8c152e289bcd1714f 100644 (file)
@@ -4,10 +4,10 @@
 ;;;;
 ;;;; Name:          foreign-var
 ;;;; Purpose:       Tests of foreign variables
-;;;; Programmer:    Kevin M. Rosenberg
+;;;; Authors:       Kevin M. Rosenberg and Edi Weitz
 ;;;; Date Started:  Aug 2003
 ;;;;
-;;;; $Id: foreign-var.lisp,v 1.3 2003/08/15 02:34:34 kevin Exp $
+;;;; $Id$
 ;;;;
 ;;;; *************************************************************************
 
   (d :double))
  
 (uffi:def-foreign-var ("fvar_struct" *fvar-struct*) fvar-struct
-  "uffi_tests")
+  "c-uffi-tests")
 
 (uffi:def-function ("fvar_struct_int" fvar-struct-int)
     ()
   :returning :int
-  :module "uffi_tests")
+  :module "c-uffi-test")
  
   (uffi:def-function ("fvar_struct_double" fvar-struct-double)
       ()
     :returning :double
-    :module "uffi_tests")
+    :module "c-uffi-test")
  
 (deftest fvarst.1 *fvar-addend* 3)
 (deftest fvarst.2 (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 42)
        (setf *fvar-addend* orig)))
   48)
 
-;;(decf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 10)
-;;(deftest fvarst.8 (fvar-struct-int) 38)
+(deftest fvarst.8 
+    (let ((orig (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i)))
+      (decf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 10)
+      (prog1
+         (fvar-struct-int)
+       (setf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) orig)))
+  35)