mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
Fix another typo in routine reading arrays
* module/ice-9/read.scm: As stated. * test-suite/tests/arrays.test: Test a fixed case.
This commit is contained in:
parent
d69062daf1
commit
a4a5fbced3
2 changed files with 6 additions and 2 deletions
|
@ -524,7 +524,7 @@
|
|||
(list lbnd (+ lbnd (1- len))))
|
||||
lbnd))))
|
||||
(define (read-shape ch alt)
|
||||
(if (memv ch '(#\@ @\:))
|
||||
(if (memv ch '(#\@ #\:))
|
||||
(let*-values (((ch head) (read-dimension ch))
|
||||
((ch tail) (read-shape ch '())))
|
||||
(values ch (cons head tail)))
|
||||
|
|
|
@ -994,7 +994,7 @@
|
|||
;;; printing arrays
|
||||
;;;
|
||||
|
||||
(with-test-prefix/c&e "printing arrays"
|
||||
(with-test-prefix/c&e "printing and reading arrays"
|
||||
(pass-if-equal "writing 1D arrays that aren't vectors"
|
||||
"#1(b c)"
|
||||
(format #f "~a" (make-shared-array #(a b c)
|
||||
|
@ -1016,6 +1016,10 @@
|
|||
(pass-if-equal "empty 3-array with last nonempty dim."
|
||||
"#3:0:0:1()"
|
||||
(format #f "~a" (make-array 1 0 0 1)))
|
||||
|
||||
(pass-if-equal "empty typed 3-array with last nonempty dim."
|
||||
"#3f64:0:0:1()"
|
||||
(format #f "~a" (make-typed-array 'f64 1 0 0 1)))
|
||||
|
||||
(pass-if-equal "empty 3-array with middle nonempty dim."
|
||||
"#3:0:1:0()"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue