Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rackunit reports success even when all tests fail #1413

Open
stevecheckoway opened this issue Nov 21, 2024 · 0 comments
Open

Rackunit reports success even when all tests fail #1413

stevecheckoway opened this issue Nov 21, 2024 · 0 comments

Comments

@stevecheckoway
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant