11159410606a2cba3d1a97133ccc2e9e08576ff4
[uffi.git] / examples / test-examples.lisp
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$
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 (asdf:oos 'asdf:load-op :uffi)
20
21 (unless (ignore-errors (find-package :util.test))
22   (load (make-pathname :name "acl-compat-tester" :defaults *load-truename*)))
23
24 (defun do-tests ()
25   (pushnew :test-uffi cl:*features*)
26   (util.test:with-tests (:name "UFFI-Tests")
27     (setq util.test:*break-on-test-failures* nil)
28     (flet ((load-test (name)
29                       (load (make-pathname :name name :defaults *load-truename*))))
30       (load-test "c-test-fns")
31       (load-test "arrays")
32       (load-test "union")
33       (load-test "strtol")
34       (load-test "atoifl")
35       (load-test "gettime")
36       (load-test "getenv")
37       (load-test "gethostname")
38       (load-test "getshells")
39       (load-test "compress"))
40     (setq cl:*features* (remove :test-uffi cl:*features*))))
41
42 (do-tests)
43