uffi/tests foreign-var.lisp,NONE,1.1 casts.lisp,1.1,1.2 foreign-loader.lisp,1.4,1.5 uffi-c-test-lib.c,1.2,1.3

"Kevin M. Rosenberg" <[email protected]> Thu, 14 Aug 2003 21:40:15 +0000
Newsgroups gmane.lisp.uffi.cvs
Message-ID <[email protected]>
Update of /pubcvs/uffi/tests
In directory boa.b9.com:/tmp/cvs-serv19046/tests

Modified Files:
	casts.lisp foreign-loader.lisp uffi-c-test-lib.c 
Added Files:
	foreign-var.lisp 
Log Message:
def-foreign-var support

Index: foreign-loader.lisp
===================================================================
RCS file: /pubcvs/uffi/tests/foreign-loader.lisp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** foreign-loader.lisp	13 Aug 2003 18:53:42 -0000	1.4
--- foreign-loader.lisp	14 Aug 2003 21:40:13 -0000	1.5
***************
*** 38,42 ****
  				     (pathname-directory *load-truename*)
  				     "/usr/lib/uffi/"))
! 	 :supporting-libraries '("c"))
    (warn "Unable to load uffi-c-test-lib library"))
  
--- 38,43 ----
  				     (pathname-directory *load-truename*)
  				     "/usr/lib/uffi/"))
! 	 :supporting-libraries '("c")
! 	 :module "uffi_tests")
    (warn "Unable to load uffi-c-test-lib library"))
  

--- NEW FILE: foreign-var.lisp ---
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name:          foreign-var
;;;; Purpose:       Tests of foreign variables
;;;; Programmer:    Kevin M. Rosenberg
;;;; Date Started:  Aug 2003
;;;;
;;;; $Id: foreign-var.lisp,v 1.1 2003/08/14 21:40:13 kevin Exp $
;;;;
;;;; *************************************************************************

(in-package #:uffi-tests)

(def-foreign-var "uchar_13" :char "uffi_tests")
(def-foreign-var "schar_neg_120" :char "uffi_tests")
(def-foreign-var "uword_257" :unsigned-short "uffi_tests")
(def-foreign-var "sword_neg_321" :short "uffi_tests")
(def-foreign-var "uint_1234567" :int "uffi_tests")
(def-foreign-var "sint_neg_123456" :int "uffi_tests")
(def-foreign-var "float_neg_4_5" :float "uffi_tests")
(def-foreign-var "double_3_1" :double "uffi_tests")

(deftest fvar.1 uchar-13 13)
(deftest fvar.2 schar-neg-120 -120)
(deftest fvar.3 uword-257 257)
(deftest fvar.4 sword-neg-321 -321)
(deftest fvar.5 uint-1234567 1234567)
(deftest fvar.6 sint-neg-123456 -123456)
(deftest fvar.7 float-neg-4-5 -4.5f0)
(deftest fvar.8 double-3-1 3.1d0)



Index: uffi-c-test-lib.c
===================================================================
RCS file: /pubcvs/uffi/tests/uffi-c-test-lib.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** uffi-c-test-lib.c	14 Aug 2003 19:35:05 -0000	1.2
--- uffi-c-test-lib.c	14 Aug 2003 21:40:13 -0000	1.3
***************
*** 40,43 ****
--- 40,52 ----
  
  
+ DLLEXPORT unsigned char uchar_13 = 13;
+ DLLEXPORT signed char schar_neg_120 = -120;
+ DLLEXPORT unsigned short uword_257 = 257;
+ DLLEXPORT signed short sword_neg_321 = -321;
+ DLLEXPORT unsigned int uint_1234567 = 1234567;
+ DLLEXPORT signed int sint_neg_123456 = -123456;
+ DLLEXPORT double double_3_1 = 3.1;
+ DLLEXPORT float float_neg_4_5 = -4.5;
+ 
  /* Test of constant input string */
  DLLEXPORT

Index: casts.lisp
===================================================================
RCS file: /pubcvs/uffi/tests/casts.lisp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** casts.lisp	14 Aug 2003 19:35:05 -0000	1.1
--- casts.lisp	14 Aug 2003 21:40:13 -0000	1.2
***************
*** 3,7 ****
  ;;;; FILE IDENTIFICATION
  ;;;;
! ;;;; Name:          casts
  ;;;; Purpose:       Tests of with-cast-pointer
  ;;;; Programmer:    Kevin M. Rosenberg / Edi Weitz
--- 3,7 ----
  ;;;; FILE IDENTIFICATION
  ;;;;
! ;;;; Name:          casts.lisp
  ;;;; Purpose:       Tests of with-cast-pointer
  ;;;; Programmer:    Kevin M. Rosenberg / Edi Weitz