r2149: *** empty log message ***
[uffi.git] / test-examples.cl
index 5ff2f5822e5449a5f8fd08130d50a94311cf6c8a..e62d2a5cfcc00f56bfc5c1213db59480b2bab1fb 100644 (file)
@@ -1,4 +1,4 @@
-;;;; -*- Mode: ANSI-Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: test-examples.cl,v 1.6 2002/03/21 04:05:15 kevin Exp $
+;;;; $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
 ;;;;
 ;;;; (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 "c-test-fns")
-  (load-test "array-2d")
-  (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)
 
-