1(defpackage #:sb-libc-tests (:use #:cl #:sb-rt)) 2(in-package "SB-LIBC-TESTS") 3 4(defparameter *tests* ; unicode strings (by default unless #-sb-unicode) 5 #("1.20203" "3.4400" "3240.2205" "10088.92" "12.3" "1000000000e-2" 6 "-323.5233243" "10001.993344e-8" "3985.1")) 7 8(deftest sb-libc.strtod.0 9 (loop with *read-default-float-format* = 'double-float 10 for string across *tests* 11 do (assert (= (sb-posix:strtod string) (read-from-string string))) 12 finally (return t)) 13 t) 14 15(deftest sb-libc.strtod.1 16 (loop with *read-default-float-format* = 'double-float 17 for string across (map 'vector 18 (lambda (x) (coerce x 'simple-base-string)) 19 *tests*) 20 do (assert (= (sb-posix:strtod string) (read-from-string string))) 21 finally (return t)) 22 t) 23