source: tags/1.9.2/t/jcoerce-numerics.lisp

Last change on this file was 15248, checked in by Mark Evenson, 5 years ago

Tests for JCOERCE across numerics without losing infomation

File size: 427 bytes
Line 
1(in-package :cl-user)
2
3(prove:plan 1)
4(prove:isnt
5 (handler-case 
6     (jcoerce 2.4 "double")
7   (error (e) (format *standard-output* "error: ~a~%" e)))
8 nil
9 "Coercing 2.4 to a double")
10
11(let ((values '(2.44 -2.44)))
12  (prove:plan (length values))
13  (dolist (value values)
14    (prove:is
15     (= (#"doubleValue" (jcoerce value "double"))
16        value)
17     (format nil "JCOERCE ~a to a 'double'" value))))
18
19(prove:finalize)
20
21
Note: See TracBrowser for help on using the repository browser.