diff options
| author | 2025-08-04 10:58:37 -0400 | |
|---|---|---|
| committer | 2025-08-04 10:58:37 -0400 | |
| commit | 90fa6934795f25561ca266f443b82d12ddc2c474 (patch) | |
| tree | 184b67b84e44dfe515f0a2d79429fdbbdad21ba5 | |
| parent | restructure (diff) | |
fix failing skipped tests
| -rw-r--r-- | lib/conspire.scm | 14 | ||||
| -rw-r--r-- | tests/impl.scm | 10 |
2 files changed, 14 insertions, 10 deletions
diff --git a/lib/conspire.scm b/lib/conspire.scm index 88d7272..1627ed1 100644 --- a/lib/conspire.scm +++ b/lib/conspire.scm @@ -368,11 +368,9 @@ (define-syntax test-skip-all (syntax-rules () ((_ body ...) - (parameterize ((test-info - (list 'replace - (test-set 'skip-test? - (lambda (_) #t))))) - body ...)))) + (test-group #f + (test-set! 'skip-test? (lambda (_) #t)) + (let () body ...))))) (define-syntax test-group (syntax-rules () @@ -389,6 +387,12 @@ (lambda () cleanup-expr)))))) (define (test-exit) + (write + `((tests passed: ,(test-ref 'passed)) + (tests failed: ,(test-ref 'failed)) + (tests skipped: ,(test-ref 'skipped)) + (total number of tests: ,(test-ref 'tests)))) + (newline) (exit (if (zero? (test-ref/default 'failed 0)) 0 1))) diff --git a/tests/impl.scm b/tests/impl.scm index 9a1ad7f..bae066a 100644 --- a/tests/impl.scm +++ b/tests/impl.scm @@ -322,11 +322,11 @@ (test-set! 'success? #f))))) (inspect-test-info values))) ;; TODO: fix failing - (test-skip-all - (test-eqv "passed number" 2 (dict-ref dto dict 'passed)) - (test-eqv "tests number" 4 (dict-ref dto dict 'tests)) - (test-eqv "failed number" 1 (dict-ref dto dict 'failed)) - (test-eqv "skipped number" 1 (dict-ref dto dict 'skipped)))) + (begin + (test-eqv "passed number" 2 (dict-ref dto dict 'passed)) + (test-eqv "tests number" 4 (dict-ref dto dict 'tests)) + (test-eqv "failed number" 1 (dict-ref dto dict 'failed)) + (test-eqv "skipped number" 1 (dict-ref dto dict 'skipped)))) (with-test-assert "nested groups" (define inner-dict #f) (define inner-dto #f) |
