From b95b1b9366436f039d497c3e1aa45283acb6498d Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 15 Aug 2012 09:34:17 -0600 Subject: [PATCH] Revert "Fixing Rackunit tests after alignment" This reverts commit 4497c8ce5e9e0fd8ff65991242f3707ea42a77a4, because the tests were correctly reporting a bug that I introduced. --- collects/tests/rackunit/format-test.rkt | 2 +- collects/tests/rackunit/pr10950.rkt | 20 ++++++++++---------- collects/tests/rackunit/standalone.rkt | 23 +++++++++++------------ collects/tests/rackunit/text-ui-test.rkt | 2 +- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/collects/tests/rackunit/format-test.rkt b/collects/tests/rackunit/format-test.rkt index e56f69236b..27bae183ee 100644 --- a/collects/tests/rackunit/format-test.rkt +++ b/collects/tests/rackunit/format-test.rkt @@ -20,5 +20,5 @@ (make-check-actual 1) (make-check-expected 2))) (get-output-string p)) - " name: \"foo\"\n actual: 1\n expected: 2\n\n")))) + "name: \"foo\"\nactual: 1\nexpected: 2\n\n")))) )) diff --git a/collects/tests/rackunit/pr10950.rkt b/collects/tests/rackunit/pr10950.rkt index da51741fab..e07a898c48 100644 --- a/collects/tests/rackunit/pr10950.rkt +++ b/collects/tests/rackunit/pr10950.rkt @@ -6,17 +6,17 @@ (define output (with-output-to-string - (lambda () - (parameterize ([current-error-port (current-output-port)]) - (define-check (check3) - (fail-check)) - - (run-tests (test-suite "tests" (let ((foo check3)) (foo)))))))) + (lambda () + (parameterize ([current-error-port (current-output-port)]) + (define-check (check3) + (fail-check)) + + (run-tests (test-suite "tests" (let ((foo check3)) (foo)))))))) (test (regexp-match - (regexp - (format "~a.*~a" - (regexp-quote "--------------------\ntests > #f\nUnnamed test \nFAILURE\n name: check3\n location: pr10950.rkt:14:50\n params: \nCheck failure\n context...:\n") - (regexp-quote "\n--------------------\n0 success(es) 1 failure(s) 0 error(s) 1 test(s) run\n"))) + (regexp (format "~a.*~a.*~a" + (regexp-quote "--------------------\ntests > #f\nUnnamed test \nFAILURE\nname: check3\nlocation: ") + (regexp-quote "pr10950.rkt:14:51") + (regexp-quote "0 success(es) 1 failure(s) 0 error(s) 1 test(s) run\n"))) output)) diff --git a/collects/tests/rackunit/standalone.rkt b/collects/tests/rackunit/standalone.rkt index fde54c2426..5c096a2266 100644 --- a/collects/tests/rackunit/standalone.rkt +++ b/collects/tests/rackunit/standalone.rkt @@ -39,11 +39,10 @@ Outta here! -------------------- -------------------- FAILURE - name: check - location: (# 44 0 1344 17) +name: check +location: (# 44 0 1344 17) expression: (check = 1 2) - params: (# 1 2) - message: 0.0 +params: (# 1 2)\nmessage: 0.0 Check failure -------------------- @@ -65,22 +64,22 @@ Second Outta here! -------------------- -------------------- FAILURE - name: check-eq? - location: (# 19 12 520 15) +name: check-eq? +location: (# 19 12 520 15) expression: (check-eq? 1 2) - actual: 1 - expected: 2 +actual: 1 +expected: 2 Check failure -------------------- -------------------- failure FAILURE - name: check-eq? - location: (# 20 21 558 15) +name: check-eq? +location: (# 20 21 558 15) expression: (check-eq? 1 2) - actual: 1 - expected: 2 +actual: 1 +expected: 2 Check failure -------------------- diff --git a/collects/tests/rackunit/text-ui-test.rkt b/collects/tests/rackunit/text-ui-test.rkt index ef440b3d6f..751deb1a90 100644 --- a/collects/tests/rackunit/text-ui-test.rkt +++ b/collects/tests/rackunit/text-ui-test.rkt @@ -139,7 +139,7 @@ (let ((op (with-all-output-to-string (failing-test)))) (check string-contains op - "location: text-ui-test.rkt")))) + "location: text-ui-test.rkt")))) (test-case "Name and location displayed before actual/expected"