fix match tests for immutable literals

svn: r8471
This commit is contained in:
Matthew Flatt 2008-01-30 00:43:15 +00:00
parent 4c23a44fd5
commit 989a163f3e
2 changed files with 12 additions and 12 deletions

View File

@ -1314,13 +1314,13 @@
;; set! for vectors ;; set! for vectors
(mytest (let ((x #(1 2))) (mytest (let ((x (vector 1 2)))
(match x (match x
(#(_ (set! set-it)) (set-it 17))) (#(_ (set! set-it)) (set-it 17)))
x) x)
#(1 17)) #(1 17))
(mytest (let ((x #(1 2))) (mytest (let ((x (vector 1 2)))
(match x (match x
(#((set! set-it) _) (set-it 17))) (#((set! set-it) _) (set-it 17)))
x) x)
@ -1328,7 +1328,7 @@
;; set! for boxes ;; set! for boxes
(mytest (let ((x #&1)) (mytest (let ((x (box 1)))
(match x (match x
(#&(set! set-it) (set-it 17))) (#&(set! set-it) (set-it 17)))
x) x)
@ -1342,7 +1342,7 @@
#&(1 17)) #&(1 17))
|# |#
(mytest (let ((x #&#(1 2))) (mytest (let ((x (box (vector 1 2))))
(match x (match x
(#&#(_ (set! set-it)) (set-it 17))) (#&#(_ (set! set-it)) (set-it 17)))
x) x)
@ -1435,7 +1435,7 @@
;; get! for vectors ;; get! for vectors
(mytest (let* ((x #(1 2)) (mytest (let* ((x (vector 1 2))
(f (f
(match x (match x
(#(_ (get! get-it)) get-it)))) (#(_ (get! get-it)) get-it))))
@ -1444,7 +1444,7 @@
(f)) 17) (f)) 17)
(mytest (let* ((x #(1 2)) (mytest (let* ((x (vector 1 2))
(f (f
(match x (match x
(#((get! get-it) _) get-it)))) (#((get! get-it) _) get-it))))
@ -1455,7 +1455,7 @@
;; get! for boxes ;; get! for boxes
(mytest (let* ((x #&1) (mytest (let* ((x (box 1))
(f (f
(match x (match x
(#&(get! get-it) get-it)))) (#&(get! get-it) get-it))))
@ -1474,7 +1474,7 @@
(f)) 17) (f)) 17)
|# |#
(mytest (let* ((x #&#(1 2)) (mytest (let* ((x (box (vector 1 2)))
(f (f
(match x (match x
(#&#(_ (get! get-it)) get-it)))) (#&#(_ (get! get-it)) get-it))))

View File

@ -2012,19 +2012,19 @@
'(1 2 (3 . 4) . 17)) '(1 2 (3 . 4) . 17))
|# |#
(mytest (mytest
(let ((x #2(1 2))) (match x ((vector _ (set! set-it)) (set-it 17))) x) (let ((x (vector 1 2))) (match x ((vector _ (set! set-it)) (set-it 17))) x)
#2(1 17)) #2(1 17))
(mytest (mytest
(let ((x #2(1 2))) (match x ((vector (set! set-it) _) (set-it 17))) x) (let ((x (vector 1 2))) (match x ((vector (set! set-it) _) (set-it 17))) x)
#2(17 2)) #2(17 2))
(mytest (let ((x #&1)) (match x ((box (set! set-it)) (set-it 17))) x) #&17) (mytest (let ((x (box 1))) (match x ((box (set! set-it)) (set-it 17))) x) #&17)
#| #|
(mytest (mytest
(let ((x #&(1 2))) (match x ((box (list _ (set! set-it))) (set-it 17))) x) (let ((x #&(1 2))) (match x ((box (list _ (set! set-it))) (set-it 17))) x)
#&(1 17)) #&(1 17))
|# |#
(mytest (mytest
(let ((x #&#2(1 2))) (let ((x (box (vector 1 2))))
(match x ((box (vector _ (set! set-it))) (set-it 17))) (match x ((box (vector _ (set! set-it))) (set-it 17)))
x) x)
#&#2(1 17)) #&#2(1 17))