chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-janitors] #1452: [test egg]: test-group eats the call-chain on


From: Chicken Trac
Subject: [Chicken-janitors] #1452: [test egg]: test-group eats the call-chain on error
Date: Fri, 23 Mar 2018 18:28:26 -0000

#1452: [test egg]: test-group eats the call-chain on error
------------------------+--------------------------------
 Reporter:  megane      |                 Owner:
     Type:  defect      |                Status:  new
 Priority:  minor       |             Milestone:  someday
Component:  extensions  |               Version:
 Keywords:  test egg    |  Estimated difficulty:
------------------------+--------------------------------
 Below is code that calls an ill behaving function `foo` three times. Only
 the third version prints the call-chain.

 It should be printed in the two calls inside `test-group`s as well.
 {{{
 (use test)

  (define (f)
    (+ 1 'a))

  (test-group "foo"
    (f))

  (test-group "bar"
    (test 2 (f)))

  (test-begin "baz")
  (f)
  (test-end "baz")

  ;; $ csi -qbn test-group-call-chains.scm
  ;;
  ;; Warning: error in group outside of tests
  ;;
  ;; Error: (+) bad argument type: a
  ;; 1 test completed in 0.0 seconds.
  ;; 1 error (100%).
  ;; 0 out of 1 (0%) tests passed.
  ;; -- done testing foo
 ----------------------------------------------------------
  ;;
  ;;
  ;; -- testing bar
 ---------------------------------------------------------------
  ;; (f) ..................................................................
 [ERROR]
  ;;
  ;; Error: (+) bad argument type: a
  ;; 1 test completed in 0.0 seconds.
  ;; 1 error (100%).
  ;; 0 out of 1 (0%) tests passed.
  ;; -- done testing bar
 ----------------------------------------------------------
  ;;
  ;;
  ;; Error: (+) bad argument type: a
  ;;
  ;;  Call history:
  ;;
  ;;  <eval>    (with-exception-handler89 (##core#lambda (exvar79) (k86
 (##core#lambda () (##core#let ((kvar80 (and8...
  ;;  <eval>    (##sys#call-with-values (##core#lambda () (begin67 (test 2
 (f)))) (##core#lambda args87 (k86 (##core...
  ;;  <eval>    (test-run102 (lambda103 () 2) (lambda103 () (f)) (cons104
 (cons104 (quote105 name106) #f) (quote105 ...
  ;;  <eval>    (cons104 (cons104 (quote105 name106) #f) (quote105
 ((source107 f) (source101 f))))
  ;;  <eval>    (cons104 (quote105 name106) #f)
  ;;  <eval>    (f)
  ;;  <eval>    [f] (+ 1 (quote a))
  ;;  <eval>    (k86 (##core#lambda () (##sys#apply ##sys#values args87)))
  ;;  <eval>    (##sys#apply ##sys#values args87)
  ;;  <eval>    (test-end76 name56)
  ;;  <eval>    (current-test-group58 old-group57)
  ;;  <syntax>      (test-begin "baz")
  ;;  <eval>    (test-begin "baz")
  ;;  <syntax>      (f)
  ;;  <eval>    (f)
  ;;  <eval>    [f] (+ 1 (quote a))   <--

 }}}

--
Ticket URL: <https://bugs.call-cc.org/ticket/1452>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]