Skip to content

Rackunit reports success even when all tests fail #1413

@stevecheckoway

Description

@stevecheckoway

This Typed Racket program should report that the "Should be a failure" test failed and no tests succeeded.

#lang typed/racket

(require typed/rackunit typed/rackunit/text-ui)
(run-tests
 (test-suite
  "Tests"
  (test-equal? "Should be a failure" 0 1)))

Here's the output of running this.

--------------------
Tests > Unnamed test
. ../../Applications/Racket v8.14/share/pkgs/rackunit-typed/rackunit/main.rkt:322:27: FAILURE
name:       check-equal?
location:
  /Applications/Racket v8.14/share/pkgs/rackunit-typed/rackunit/main.rkt:322:27
actual:     0
expected:   1
--------------------
1 success(es) 0 failure(s) 0 error(s) 1 test(s) run
0

Notice that the test doesn't get a name and the file/line reported as containing the error is not my code, but Typed Racket's rackunit instead.

The equivalent test in normal Racket works as expected.

#lang racket

(require rackunit rackunit/text-ui)
(run-tests
 (test-suite
  "Tests"
  (test-equal? "Should be a failure" 0 1)))

outputs

--------------------
Tests > Should be a failure
. FAILURE
name:       check-equal?
location:   11-unsaved-editor:7:2
actual:     0
expected:   1
--------------------
0 success(es) 1 failure(s) 0 error(s) 1 test(s) run
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy