1
Fork 0
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:
Ludovic Courtès 2013-04-03 19:13:23 +02:00
parent 51a1763f65
commit 0d7f3a6d95

View file

@ -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))))