1 (defpackage #:sb-libc-tests
(:use
#:cl
#:sb-rt
))
2 (in-package "SB-LIBC-TESTS")
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"))
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
)))
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
))
20 do
(assert (= (sb-posix:strtod string
) (read-from-string string
)))