Change RUN-SUB-TEST to allow it to take properties.
authorChris Hanson <org/chris-hanson/cph>
Wed, 2 Jun 2010 09:08:06 +0000 (02:08 -0700)
committerChris Hanson <org/chris-hanson/cph>
Wed, 2 Jun 2010 09:08:06 +0000 (02:08 -0700)
tests/unit-testing.scm

index 1e95c9a1ee924880d3ad0a7273dd4d1466ae2efa..ca9ecd40dc8ea41a72375c9dc85f2f59068575c2 100644 (file)
@@ -273,17 +273,20 @@ USA.
 \f
 ;;;; Assertions
 
-(define-for-tests (run-sub-test thunk)
+(define-for-tests (run-sub-test thunk . properties)
   (call-with-current-continuation
    (lambda (k)
      (bind-condition-handlers
       (list condition-type:failure
            (lambda (condition)
-             (k (access-condition condition 'FAILURE)))
+             (k (extend-failure (condition-failure condition)
+                                properties)))
            condition-type:error
            (lambda (condition)
              (if (not throw-test-errors?)
-                 (k (make-failure 'CONDITION condition)))))
+                 (k (apply make-failure
+                           'CONDITION condition
+                           properties)))))
       (lambda ()
        (thunk)
        #f)))))