3c886a170e7db27b19511c02e65732fc85ffc2e1
[uffi.git] / tests / structs.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          structs.lisp
6 ;;;; Purpose:       Test file for UFFI structures
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Feb 2002
9 ;;;;
10 ;;;; $Id$
11 ;;;;
12 ;;;; This file, part of UFFI, is Copyright (c) 2002-2003 by Kevin M. Rosenberg
13 ;;;;
14 ;;;; *************************************************************************
15
16 (in-package #:uffi-tests)
17
18 ;; Compilation failure as reported by Edi Weitz
19
20
21 (uffi:def-struct foo
22     (bar :pointer-self))
23
24 (uffi:def-foreign-type foo-ptr (* foo))
25
26 ;; tests that compilation worked
27 (deftest :structs.1 
28   (with-foreign-object (p 'foo)
29     t)
30   t)
31
32 (deftest :structs.2
33     (progn
34       (uffi:def-foreign-type foo-struct (:struct foo))
35       t)
36   t)