Skip to content

Commit a415c76

Browse files
committed
LNCORE: Modify listlist unit test to pass in debug mode
In Scheme, quoted objects are not mutable, so those that are to be changed need to be declared with (list (list ... not '((
1 parent c26519e commit a415c76

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/ln_core/listlist.scm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#|
22
LambdaNative - a cross-platform Scheme framework
3-
Copyright (c) 2009-2013, University of British Columbia
3+
Copyright (c) 2009-2020, University of British Columbia
44
All rights reserved.
55

66
Redistribution and use in source and binary forms, with or
@@ -236,9 +236,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
236236
)))
237237
(unit-test "listlist-set!" "Matrix value setting"
238238
(lambda () (and
239-
(equal? (let ((m '((1 2) (3 4)))) (listlist-set! m 0 0 5)) '((5 2) (3 4)))
240-
(equal? (let ((m '((1 2) (3 4)))) (listlist-set! m 1 0 5)) '((1 2) (5 4)))
241-
(equal? (let ((m '((1 2 3) (4 5 6) (7 8 9)))) (listlist-set! m 1 1 55))
239+
(equal? (let ((m (list (list 1 2) (list 3 4)))) (listlist-set! m 0 0 5)) '((5 2) (3 4)))
240+
(equal? (let ((m (list (list 1 2) (list 3 4)))) (listlist-set! m 1 0 5)) '((1 2) (5 4)))
241+
(equal? (let ((m (list (list 1 2 3) (list 4 5 6) (list 7 8 9)))) (listlist-set! m 1 1 55))
242242
'((1 2 3) (4 55 6) (7 8 9)))
243243
)))
244244
;;eof

0 commit comments

Comments
 (0)