Racket Mode emacs, test coverage not working on match?

In racket-mode for emacs, there is a command racket-test, that can be run with test coverage using C-u C-u C-c C-t (Racket Mode).

When running this, everything gets covered, besides match expressions.

When using other tools such as DrRacket, or raco cover, they are getting the correct test coverage.

Has any one else ever run into this?

1 Like

Can you link a code example of such match-tests?

1 Like

It looks like an example would be:

#lang racket/base
(require racket/match)
(define (f v)
  (match v
    [v v]))
(define (g v)
  v)
(module+ test
  (f 42)
  (g 12))

After C-u C-u C-c C-t the entire (match __) form is highlighted in red as "uncovered".

I opened issue 660.

2 Likes

@greghendershott , many thanks for taking the time to build an example yourself, that's kind of above and beyond!

@jlucero805 I pushed a commit to fix this, which should flow through to MELPA within a couple hours. If you want to try it, please see updating Racket Mode.

1 Like