mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-10 22:10:21 +02:00
tests: Use `pass-if-equal' in ramap.test.
* test-suite/tests/ramap.test ("array-for-each"): Use `pass-if-equal' instead of `(pass-if ... (equal? ...))'.
This commit is contained in:
parent
51a1763f65
commit
0d7f3a6d95
1 changed files with 16 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
;;;; ramap.test --- test array mapping functions -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright (C) 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
;;;; Copyright (C) 2004, 2005, 2006, 2009, 2013 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This library is free software; you can redistribute it and/or
|
||||
;;;; modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -228,30 +228,34 @@
|
|||
(with-test-prefix "array-for-each"
|
||||
|
||||
(with-test-prefix "3 sources"
|
||||
(pass-if "noncompact arrays 1"
|
||||
(pass-if-equal "noncompact arrays 1"
|
||||
'((3 3 3) (2 2 2))
|
||||
(let* ((a #2((0 1) (2 3)))
|
||||
(l '())
|
||||
(rec (lambda args (set! l (cons args l)))))
|
||||
(array-for-each rec (array-row a 1) (array-row a 1) (array-row a 1))
|
||||
(equal? l '((3 3 3) (2 2 2)))))
|
||||
|
||||
(pass-if "noncompact arrays 2"
|
||||
l))
|
||||
|
||||
(pass-if-equal "noncompact arrays 2"
|
||||
'((3 3 3) (2 2 1))
|
||||
(let* ((a #2((0 1) (2 3)))
|
||||
(l '())
|
||||
(rec (lambda args (set! l (cons args l)))))
|
||||
(array-for-each rec (array-row a 1) (array-row a 1) (array-col a 1))
|
||||
(equal? l '((3 3 3) (2 2 1)))))
|
||||
|
||||
(pass-if "noncompact arrays 3"
|
||||
l))
|
||||
|
||||
(pass-if-equal "noncompact arrays 3"
|
||||
'((3 3 3) (2 1 1))
|
||||
(let* ((a #2((0 1) (2 3)))
|
||||
(l '())
|
||||
(rec (lambda args (set! l (cons args l)))))
|
||||
(array-for-each rec (array-row a 1) (array-col a 1) (array-col a 1))
|
||||
(equal? l '((3 3 3) (2 1 1)))))
|
||||
|
||||
(pass-if "noncompact arrays 4"
|
||||
l))
|
||||
|
||||
(pass-if-equal "noncompact arrays 4"
|
||||
'((3 2 3) (1 0 2))
|
||||
(let* ((a #2((0 1) (2 3)))
|
||||
(l '())
|
||||
(rec (lambda args (set! l (cons args l)))))
|
||||
(array-for-each rec (array-col a 1) (array-col a 0) (array-row a 1))
|
||||
(equal? l '((3 2 3) (1 0 2)))))))
|
||||
l))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue