diff --git a/test-suite/test-suite/lib.scm b/test-suite/test-suite/lib.scm index 756d97ecc..7517b4ec5 100644 --- a/test-suite/test-suite/lib.scm +++ b/test-suite/test-suite/lib.scm @@ -360,8 +360,10 @@ (define-syntax pass-if-equal (syntax-rules () "Succeed if and only if BODY's return value is equal? to EXPECTED." + ((_ expected body) + (pass-if-equal 'body expected body)) ((_ name expected body ...) - (run-test 'name #t + (run-test name #t (lambda () (let ((result (begin body ...))) (or (equal? expected result) diff --git a/test-suite/tests/arrays.test b/test-suite/tests/arrays.test index b6eee7c3d..cf0983221 100644 --- a/test-suite/tests/arrays.test +++ b/test-suite/tests/arrays.test @@ -1,6 +1,6 @@ ;;;; unif.test --- tests guile's uniform arrays -*- scheme -*- ;;;; -;;;; Copyright 2004, 2006, 2009, 2010, 2011 Free Software Foundation, Inc. +;;;; Copyright 2004, 2006, 2009, 2010, 2011, 2012 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 @@ -211,10 +211,10 @@ ;;; (with-test-prefix "array->list" - (pass-if (equal? (array->list #s16(1 2 3)) '(1 2 3))) - (pass-if (equal? (array->list #(1 2 3)) '(1 2 3))) - (pass-if (equal? (array->list #2((1 2) (3 4) (5 6))) '((1 2) (3 4) (5 6)))) - (pass-if (equal? (array->list #()) '()))) + (pass-if-equal '(1 2 3) (array->list #s16(1 2 3))) + (pass-if-equal '(1 2 3) (array->list #(1 2 3))) + (pass-if-equal '((1 2) (3 4) (5 6)) (array->list #2((1 2) (3 4) (5 6)))) + (pass-if-equal '() (array->list #()))) ;;;