b23b3ce27c69afcd4a0c0ad10adf593bf140db81
[uffi.git] / tests / test-examples.cl
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          test-examples.cl
6 ;;;; Purpose:       Load and execute all examples for UFFI
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Feb 2002
9 ;;;;
10 ;;;; $Id: test-examples.cl,v 1.1 2002/07/26 03:24:29 kevin Exp $
11 ;;;;
12 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
13 ;;;;
14 ;;;; UFFI users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
18
19 #-uffi
20 (mk:load-system :uffi)
21
22 #-allegro
23 (load (make-pathname :name "acl-compat-tester" :type "cl"
24                      :defaults *load-truename*))
25
26
27 (defun do-tests ()
28   (pushnew :test-uffi cl:*features*)
29   (util.test:with-tests (:name "UFFI")
30     (setq util.test:*break-on-test-failures* t)
31     (flet ((load-test (name)
32              (load (merge-pathnames
33                     (make-pathname :name name 
34                                    :type "cl"
35                     *load-truename*))))
36       
37       (load-test "c-test-fns")
38       (load-test "arrays")
39       (load-test "union")
40       (load-test "strtol")
41       (load-test "atoifl")
42       (load-test "gettime")
43       (load-test "getenv")
44       (load-test "gethostname")
45       (load-test "getshells")
46       (load-test "compress"))
47     (setq cl:*features* (remove :test-uffi cl:*features*))))
48
49 (do-tests)
50