florence / cover

a code coverage tool for racket
MIT License
38 stars 7 forks source link

Missed coverage when using in-indexed in for loops #120

Closed lexi-lambda closed 8 years ago

lexi-lambda commented 8 years ago

The following program should be fully covered, but cover reports missing coverage:

#lang racket

(define (indexed lst)
  (for/list ([(x i) (in-indexed lst)])
    (cons i x)))

(indexed '(a b c d e))

Specifically, this expression is marked as uncovered:

 (for/list ([(x i) (in-indexed lst)])
;             ^ this x is apparently uncovered

I’m not sure if this is an issue with cover or with in-indexed, but I figured reporting it here probably makes at least a little sense.

florence commented 8 years ago

This is likely a manifestation of https://github.com/racket/errortrace/issues/2

florence commented 8 years ago

(I swear I'll get around to fixing that someday...)

florence commented 8 years ago

Fixed this in the errortrace repo