r2149: *** empty log message ***
[uffi.git] / test-examples.cl
index 09a378318393b92102d9fe2dddc354f817f6ba6e..e62d2a5cfcc00f56bfc5c1213db59480b2bab1fb 100644 (file)
@@ -1,22 +1,51 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          test-examples.cl
+;;;; Purpose:       Load and execute all examples for UFFI
+;;;; Programmer:    Kevin M. Rosenberg
+;;;; Date Started:  Feb 2002
+;;;;
+;;;; $Id: test-examples.cl,v 1.11 2002/04/02 23:27:05 kevin Exp $
+;;;;
+;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;;
+;;;; UFFI users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+;;;; *************************************************************************
+
+#-uffi
 (mk:load-system :uffi)
 
-(pushnew :test-uffi cl:*features*)
+#-allegro
+(load (make-pathname :name "acl-compat-tester" :type "cl"
+                    :defaults *load-truename*))
 
-(flet ((load-test (name)
-        (load (merge-pathnames
-               (make-pathname :name name 
-                              :type "cl"
-                              :directory '(:relative "examples"))
-               *load-truename*))))
-       
-  (load-test "strtol")
-  (load-test "gettime")
-  (load-test "getenv")
-  (load-test "gethostname")
-  (load-test "getshells")
-  (load-test "compress"))
 
-(setq cl:*features* (remove :test-uffi cl:*features*))
+(defun do-tests ()
+  (pushnew :test-uffi cl:*features*)
+  (util.test:with-tests (:name "UFFI")
+    (setq util.test:*break-on-test-failures* t)
+    (flet ((load-test (name)
+            (load (merge-pathnames
+                   (make-pathname :name name 
+                                  :type "cl"
+                                  :directory '(:relative "examples"))
+                   *load-truename*))))
+      
+      (load-test "c-test-fns")
+      (load-test "arrays")
+      (load-test "union")
+      (load-test "strtol")
+      (load-test "atoifl")
+      (load-test "gettime")
+      (load-test "getenv")
+      (load-test "gethostname")
+      (load-test "getshells")
+      (load-test "compress"))
+    (setq cl:*features* (remove :test-uffi cl:*features*))))
 
+(do-tests)
 
-