r1734: *** empty log message ***
[uffi.git] / examples / strtol.cl
index a115b2a8019e856058a0b21edbaf14d0a247574f..32c5c42e1bfd836a54595db210d5e7b9d7337c6f 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: strtol.cl,v 1.12 2002/03/23 16:32:39 kevin Exp $
+;;;; $Id: strtol.cl,v 1.15 2002/04/02 23:27:05 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -59,7 +59,7 @@ of first non-valid character"
 
  
   
-#+test-uffi
+#+examples-uffi
 (progn
   (flet ((print-results (str)
           (multiple-value-bind (result flag) (strtol str)
@@ -68,3 +68,16 @@ of first non-valid character"
     (print-results "55.3")
     (print-results "a")))
 
+#+test-uffi
+(progn
+  (flet ((test-strtol (str results)
+          (util.test:test (multiple-value-list (strtol str)) results
+                          :test #'equal
+                          :fail-info "Error testing strtol")))
+    (test-strtol "123" '(123 t))
+    (test-strtol "0" '(0 t))
+    (test-strtol "55a" '(55 2))
+    (test-strtol "a" '(nil nil))))
+
+                          
+