(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)
;;;; 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
;;;
(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 #())))
;;;