[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] branch master updated: Fix another typo in routine readi
From: |
Daniel Llorens |
Subject: |
[Guile-commits] branch master updated: Fix another typo in routine reading arrays |
Date: |
Tue, 02 Mar 2021 09:14:02 -0500 |
This is an automated email from the git hooks/post-receive script.
lloda pushed a commit to branch master
in repository guile.
The following commit(s) were added to refs/heads/master by this push:
new a4a5fbc Fix another typo in routine reading arrays
a4a5fbc is described below
commit a4a5fbced344b12335d538102c7fe37f5848a519
Author: Daniel Llorens <lloda@sarc.name>
AuthorDate: Tue Mar 2 15:12:20 2021 +0100
Fix another typo in routine reading arrays
* module/ice-9/read.scm: As stated.
* test-suite/tests/arrays.test: Test a fixed case.
---
module/ice-9/read.scm | 2 +-
test-suite/tests/arrays.test | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/module/ice-9/read.scm b/module/ice-9/read.scm
index 29175d5..a1e4e7a 100644
--- a/module/ice-9/read.scm
+++ b/module/ice-9/read.scm
@@ -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)))
diff --git a/test-suite/tests/arrays.test b/test-suite/tests/arrays.test
index e913e30..c8eed39 100644
--- a/test-suite/tests/arrays.test
+++ b/test-suite/tests/arrays.test
@@ -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()"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Guile-commits] branch master updated: Fix another typo in routine reading arrays,
Daniel Llorens <=