Last change
on this file was
15247,
checked in by Mark Evenson, 5 years ago
|
Correct the format dollar tests to produce meaningful results
This test now passed on SBCL
|
File size:
963 bytes
|
Line | |
---|
1 | ;;; tests for FORMAT wackiness <https://abcl.org/trac/ticket/190> |
---|
2 | |
---|
3 | (prove:plan 15) |
---|
4 | |
---|
5 | (prove:is |
---|
6 | (format nil "~,vf" 3 -0.1768522) |
---|
7 | "-0.177") ;; sbcl |
---|
8 | |
---|
9 | (prove:is |
---|
10 | (format nil "~,vf" 2 -0.1768522) |
---|
11 | "-0.18") |
---|
12 | |
---|
13 | (prove:is |
---|
14 | (format nil "~,vf" 1 -0.1768522) |
---|
15 | "-0.2") |
---|
16 | |
---|
17 | (prove:is |
---|
18 | (format nil "~,vf" 0 -0.1768522) |
---|
19 | "-0.") |
---|
20 | |
---|
21 | (prove:is |
---|
22 | (format nil "~$" -0.1768522) |
---|
23 | "-0.18") |
---|
24 | |
---|
25 | (prove:is |
---|
26 | (format nil "~v$" 3 -0.1768522) |
---|
27 | "-0.177") |
---|
28 | |
---|
29 | (prove:is |
---|
30 | (format nil "~v$" 2 -0.1768522) |
---|
31 | "-0.18") |
---|
32 | |
---|
33 | (prove:is |
---|
34 | (format nil "~v$" 1 -0.1768522) |
---|
35 | "-0.2") ;; reported type error: Array index out of bounds: |
---|
36 | |
---|
37 | (prove:is |
---|
38 | (format nil "~v$" 0 -0.1768522) |
---|
39 | "-0.") |
---|
40 | |
---|
41 | (prove:is |
---|
42 | (format nil "~$" 0.1768522) |
---|
43 | "0.18") |
---|
44 | |
---|
45 | (prove:is |
---|
46 | (format nil "~v$" 3 0.1768522) |
---|
47 | "0.177") |
---|
48 | |
---|
49 | (prove:is |
---|
50 | (format nil "~v$" 2 0.1768522) |
---|
51 | "0.18") |
---|
52 | |
---|
53 | (prove:is |
---|
54 | (format nil "~v$" 1 0.1768522) |
---|
55 | "0.2") |
---|
56 | |
---|
57 | (prove:is |
---|
58 | (format nil "~v$" 0 0.1768522) |
---|
59 | "0.") |
---|
60 | |
---|
61 | ;; dingd |
---|
62 | (prove:is |
---|
63 | (format nil "~$" -0.0) |
---|
64 | "0.00") ;; sbcl |
---|
65 | |
---|
66 | (prove:finalize) |
---|
Note: See
TracBrowser
for help on using the repository browser.