"Racunit" -> "Rackunit"
original commit: 7b14a1f585d368bca8967072fbf3530d568e1391
This commit is contained in:
parent
a25df897ed
commit
dbf0a806a2
|
@ -6,7 +6,7 @@
|
|||
(define (test/gui . tests)
|
||||
(apply (make-gui-runner) tests))
|
||||
|
||||
(define test/c (or/c racunit-test-case? racunit-test-suite?))
|
||||
(define test/c (or/c rackunit-test-case? rackunit-test-suite?))
|
||||
|
||||
(provide/contract
|
||||
[test/gui
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
;; struct test :
|
||||
(define-struct test ())
|
||||
;; struct (racunit-test-case test) : (U string #f) thunk
|
||||
(define-struct (racunit-test-case test) (name action) #:transparent)
|
||||
;; struct (racunit-test-suite test) : string (fdown fup fhere seed -> (listof test-result)) thunk thunk
|
||||
(define-struct (racunit-test-suite test) (name tests before after) #:transparent)
|
||||
;; struct (rackunit-test-case test) : (U string #f) thunk
|
||||
(define-struct (rackunit-test-case test) (name action) #:transparent)
|
||||
;; struct (rackunit-test-suite test) : string (fdown fup fhere seed -> (listof test-result)) thunk thunk
|
||||
(define-struct (rackunit-test-suite test) (name tests before after) #:transparent)
|
||||
|
||||
;; struct exn:test exn : ()
|
||||
;;
|
||||
|
@ -33,10 +33,10 @@
|
|||
(define-struct (test-success test-result) (result))
|
||||
|
||||
(provide/contract
|
||||
(struct (racunit-test-case test)
|
||||
(struct (rackunit-test-case test)
|
||||
((name (or/c string? false/c))
|
||||
(action (-> any))))
|
||||
(struct (racunit-test-suite test)
|
||||
(struct (rackunit-test-suite test)
|
||||
((name string?)
|
||||
(tests procedure?)
|
||||
(before (-> any))
|
|
@ -11,7 +11,7 @@
|
|||
;; Infrastructure ----------------------------------------------
|
||||
|
||||
;; The continuation mark under which all check-info is keyed
|
||||
(define check-info-mark (gensym 'racunit))
|
||||
(define check-info-mark (gensym 'rackunit))
|
||||
|
||||
;; (continuation-mark-set -> (listof check-info))
|
||||
(define (check-info-stack marks)
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
;; Frame size preferences
|
||||
|
||||
(preferences:set-default 'racunit:frame:width 400 exact-positive-integer?)
|
||||
(preferences:set-default 'racunit:frame:height 400 exact-positive-integer?)
|
||||
(define pref:width (pref:get/set 'racunit:frame:width))
|
||||
(define pref:height (pref:get/set 'racunit:frame:height))
|
||||
(preferences:set-default 'rackunit:frame:width 400 exact-positive-integer?)
|
||||
(preferences:set-default 'rackunit:frame:height 400 exact-positive-integer?)
|
||||
(define pref:width (pref:get/set 'rackunit:frame:width))
|
||||
(define pref:height (pref:get/set 'rackunit:frame:height))
|
||||
|
||||
;; CONSTANTS
|
||||
;; Some of these are obsolete, given the preferences above.
|
|
@ -25,18 +25,18 @@
|
|||
;; create-model : test suite<%>/#f -> result<%>
|
||||
(define/public (create-model test parent)
|
||||
(define result
|
||||
(cond [(racunit-test-case? test)
|
||||
(cond [(rackunit-test-case? test)
|
||||
(new case-result%
|
||||
(controller this)
|
||||
(test test)
|
||||
(name (or (racunit-test-case-name test)
|
||||
(name (or (rackunit-test-case-name test)
|
||||
"<unnamed test-case>"))
|
||||
(parent parent))]
|
||||
[(racunit-test-suite? test)
|
||||
[(rackunit-test-suite? test)
|
||||
(new suite-result%
|
||||
(controller this)
|
||||
(test test)
|
||||
(name (or (racunit-test-suite-name test)
|
||||
(name (or (rackunit-test-suite-name test)
|
||||
"<unnamed test-suite>"))
|
||||
(parent parent))]))
|
||||
(send/i view view<%> create-view-link result parent)
|
|
@ -48,8 +48,8 @@
|
|||
#|
|
||||
(define/public (run)
|
||||
(let ([custodian (make-custodian)]
|
||||
[before (racunit-test-suite-before test)]
|
||||
[after (racunit-test-suite-after test)])
|
||||
[before (rackunit-test-suite-before test)]
|
||||
[after (rackunit-test-suite-after test)])
|
||||
(parameterize [(current-custodian custodian)]
|
||||
(dynamic-wind
|
||||
before
|
||||
|
@ -112,8 +112,8 @@
|
|||
(call-with-continuation-prompt
|
||||
(lambda ()
|
||||
(time-apply run-test-case
|
||||
(list (racunit-test-case-name test)
|
||||
(racunit-test-case-action test)))))])
|
||||
(list (rackunit-test-case-name test)
|
||||
(rackunit-test-case-action test)))))])
|
||||
(values (car results) (list cputime realtime gctime))))
|
||||
|
||||
(define (make-output-ports)
|
Before Width: | Height: | Size: 513 B After Width: | Height: | Size: 513 B |
|
@ -7,7 +7,7 @@
|
|||
|
||||
(provide insert-text
|
||||
ext:text%
|
||||
racunit-style-map)
|
||||
rackunit-style-map)
|
||||
|
||||
;; insert-text : text% string style-delta% -> void
|
||||
(define (insert-text e text style)
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
(define ext:text-mixin
|
||||
(mixin (text<%>) ()
|
||||
(init-field (style-map racunit-style-map))
|
||||
(init-field (style-map rackunit-style-map))
|
||||
(inherit last-position
|
||||
change-style
|
||||
set-clickback
|
||||
|
@ -139,7 +139,7 @@
|
|||
[error . ,style:red]
|
||||
[value . ,style:darkblue]))
|
||||
|
||||
(define racunit-styles
|
||||
(define rackunit-styles
|
||||
`([test-unexecuted . ,style:gray]
|
||||
[test-success . ,style:green]
|
||||
[test-failure . ,style:red]
|
||||
|
@ -181,7 +181,7 @@
|
|||
(extend-style-map empty-style-map
|
||||
basic-styles))
|
||||
|
||||
;; racunit-style-map : style-map<%>
|
||||
(define racunit-style-map
|
||||
;; rackunit-style-map : style-map<%>
|
||||
(define rackunit-style-map
|
||||
(extend-style-map basic-style-map
|
||||
racunit-styles))
|
||||
rackunit-styles))
|
|
@ -13,7 +13,7 @@
|
|||
(provide make-view-frame
|
||||
view%)
|
||||
|
||||
(define style-map racunit-style-map)
|
||||
(define style-map rackunit-style-map)
|
||||
|
||||
#|
|
||||
|
||||
|
@ -50,7 +50,7 @@ still be there, just not visible?
|
|||
controller)
|
||||
(super-new)
|
||||
|
||||
(define editor (new ext:text% (style-map racunit-style-map)))
|
||||
(define editor (new ext:text% (style-map rackunit-style-map)))
|
||||
(define renderer
|
||||
(new model-renderer%
|
||||
(controller controller)
|
||||
|
@ -146,7 +146,7 @@ still be there, just not visible?
|
|||
;; If the view-link has not been created,
|
||||
;; yield until it is.
|
||||
(unless (yield)
|
||||
(error 'racunit-gui
|
||||
(error 'rackunit-gui
|
||||
"internal error: no progress waiting for view-link"))
|
||||
(do-model-update model)])))
|
||||
|
|
@ -51,12 +51,12 @@
|
|||
;; data so FP is a bit ugly].
|
||||
(define (foldts fdown fup fhere seed test)
|
||||
(cond
|
||||
((racunit-test-case? test)
|
||||
((rackunit-test-case? test)
|
||||
(fhere test
|
||||
(racunit-test-case-name test)
|
||||
(racunit-test-case-action test)
|
||||
(rackunit-test-case-name test)
|
||||
(rackunit-test-case-action test)
|
||||
seed))
|
||||
((racunit-test-suite? test)
|
||||
((rackunit-test-suite? test)
|
||||
(apply-test-suite test fdown fup fhere seed))
|
||||
(else
|
||||
(raise
|
|
@ -27,14 +27,14 @@
|
|||
(define (test-suite-test-case-around fhere)
|
||||
(lambda (thunk)
|
||||
(let* ([name (current-test-name)]
|
||||
[test (make-racunit-test-case name thunk)]
|
||||
[test (make-rackunit-test-case name thunk)]
|
||||
[seed (current-seed)])
|
||||
(current-seed (fhere test name thunk seed)))))
|
||||
|
||||
(define (test-suite-check-around fhere)
|
||||
(lambda (thunk)
|
||||
(let* ([name #f]
|
||||
[test (make-racunit-test-case name thunk)]
|
||||
[test (make-rackunit-test-case name thunk)]
|
||||
[seed (current-seed)])
|
||||
(current-seed (fhere test name thunk seed)))))
|
||||
|
||||
|
@ -42,12 +42,12 @@
|
|||
(define delayed-test-case-around
|
||||
(lambda (thunk)
|
||||
(let ([name (current-test-name)])
|
||||
(make-racunit-test-case name thunk))))
|
||||
(make-rackunit-test-case name thunk))))
|
||||
|
||||
(define delayed-check-around
|
||||
(lambda (thunk)
|
||||
(let ([name #f])
|
||||
(make-racunit-test-case name thunk))))
|
||||
(make-rackunit-test-case name thunk))))
|
||||
|
||||
(define-syntax delay-test
|
||||
(syntax-rules ()
|
||||
|
@ -58,12 +58,12 @@
|
|||
test test1 ...)]))
|
||||
|
||||
(define (apply-test-suite suite fdown fup fhere seed)
|
||||
(let* ([name (racunit-test-suite-name suite)]
|
||||
[tests (racunit-test-suite-tests suite)]
|
||||
[before (racunit-test-suite-before suite)]
|
||||
[after (racunit-test-suite-after suite)]
|
||||
(let* ([name (rackunit-test-suite-name suite)]
|
||||
[tests (rackunit-test-suite-tests suite)]
|
||||
[before (rackunit-test-suite-before suite)]
|
||||
[after (rackunit-test-suite-after suite)]
|
||||
[kid-seed (fdown suite name before after seed)]
|
||||
[kid-seed ((racunit-test-suite-tests suite) fdown fup fhere kid-seed)])
|
||||
[kid-seed ((rackunit-test-suite-tests suite) fdown fup fhere kid-seed)])
|
||||
(fup suite name before after seed kid-seed)))
|
||||
|
||||
;; test-suite : name [#:before thunk] [#:after thunk] test ...
|
||||
|
@ -84,7 +84,7 @@
|
|||
[the-tests
|
||||
(lambda (fdown fup fhere seed)
|
||||
(define (run/inner x)
|
||||
(cond [(racunit-test-suite? x)
|
||||
(cond [(rackunit-test-suite? x)
|
||||
(current-seed
|
||||
(apply-test-suite x fdown fup fhere (current-seed)))]
|
||||
[(list? x)
|
||||
|
@ -103,7 +103,7 @@
|
|||
[(not (string? the-name))
|
||||
(raise-type-error 'test-suite "test-suite name as string" the-name)]
|
||||
[else
|
||||
(make-racunit-test-suite
|
||||
(make-rackunit-test-suite
|
||||
the-name
|
||||
the-tests
|
||||
before-thunk
|
||||
|
@ -138,13 +138,13 @@
|
|||
(for-each
|
||||
(lambda (t)
|
||||
(cond
|
||||
[(racunit-test-suite? t)
|
||||
[(rackunit-test-suite? t)
|
||||
(current-seed (apply-test-suite t fdown fup fhere (current-seed)))]
|
||||
[(racunit-test-case? t)
|
||||
[(rackunit-test-case? t)
|
||||
(current-seed
|
||||
(fhere t
|
||||
(racunit-test-case-name t)
|
||||
(racunit-test-case-action t)
|
||||
(rackunit-test-case-name t)
|
||||
(rackunit-test-case-action t)
|
||||
(current-seed)))]
|
||||
[else
|
||||
(raise
|
||||
|
@ -158,7 +158,7 @@
|
|||
;;
|
||||
;; Construct a test suite from a list of tests
|
||||
(define (make-test-suite name #:before [before void-thunk] #:after [after void-thunk] tests)
|
||||
(make-racunit-test-suite name
|
||||
(make-rackunit-test-suite name
|
||||
(tests->test-suite-action tests)
|
||||
before
|
||||
after))
|
|
@ -16,8 +16,8 @@
|
|||
(struct-out test-failure)
|
||||
(struct-out test-error)
|
||||
(struct-out test-success)
|
||||
(struct-out racunit-test-case)
|
||||
(struct-out racunit-test-suite)
|
||||
(struct-out rackunit-test-case)
|
||||
(struct-out rackunit-test-suite)
|
||||
|
||||
with-check-info
|
||||
with-check-info*
|
||||
|
@ -43,9 +43,9 @@
|
|||
test-suite
|
||||
make-test-suite
|
||||
delay-test
|
||||
(rename-out [make-racunit-test-case make-test-case]
|
||||
[racunit-test-case? test-case?]
|
||||
[racunit-test-suite? test-suite?])
|
||||
(rename-out [make-rackunit-test-case make-test-case]
|
||||
[rackunit-test-case? test-case?]
|
||||
[rackunit-test-suite? test-suite?])
|
||||
current-test-name
|
||||
current-test-case-around
|
||||
test-suite-test-case-around
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
@title[#:tag "api"]{RacUnit API}
|
||||
|
||||
@defmodule[racunit
|
||||
#:use-sources (racunit)]
|
||||
@defmodule[rackunit
|
||||
#:use-sources (rackunit)]
|
||||
|
||||
@include-section["overview.scrbl"]
|
||||
@include-section["check.scrbl"]
|
|
@ -6,15 +6,15 @@
|
|||
|
||||
(for-label scheme/base
|
||||
scheme/contract
|
||||
racunit
|
||||
racunit/text-ui
|
||||
racunit/gui))
|
||||
rackunit
|
||||
rackunit/text-ui
|
||||
rackunit/gui))
|
||||
|
||||
(provide
|
||||
(all-from-out scribble/eval
|
||||
scribble/manual)
|
||||
(for-label (all-from-out scheme/base
|
||||
scheme/contract
|
||||
racunit
|
||||
racunit/text-ui
|
||||
racunit/gui)))
|
||||
rackunit
|
||||
rackunit/text-ui
|
||||
rackunit/gui)))
|
|
@ -1,6 +1,6 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require racunit
|
||||
(require rackunit
|
||||
"file.rkt")
|
||||
|
||||
(check-equal? (my-+ 1 1) 2)
|
|
@ -17,5 +17,5 @@ especially when mixed with compiled code. Use at your own risk!
|
|||
This example gets @racket[make-failure-test], which is defined in a RacUnit test:
|
||||
|
||||
@racketblock[
|
||||
(require/expose racunit/private/check-test (make-failure-test))
|
||||
(require/expose rackunit/private/check-test (make-failure-test))
|
||||
]
|
|
@ -32,7 +32,7 @@ RacUnit and @tt{file.rkt}:
|
|||
@racketmod[
|
||||
racket/base
|
||||
|
||||
(require racunit
|
||||
(require rackunit
|
||||
"file.rkt")
|
||||
]
|
||||
|
||||
|
@ -91,7 +91,7 @@ Evalute this and you should see an error message like:
|
|||
A test
|
||||
... has a FAILURE
|
||||
name: check-pred
|
||||
location: (#<path:/Users/noel/programming/schematics/racunit/branches/v3/doc/file-test.rkt> 14 6 252 22)
|
||||
location: (#<path:/Users/noel/programming/schematics/rackunit/branches/v3/doc/file-test.rkt> 14 6 252 22)
|
||||
expression: (check-pred even? elt)
|
||||
params: (#<procedure:even?> 9)
|
||||
--------------------
|
||||
|
@ -153,7 +153,7 @@ will do for our example). In @tt{file-test.rkt} add the
|
|||
following lines:
|
||||
|
||||
@racketblock[
|
||||
(require racunit/text-ui)
|
||||
(require rackunit/text-ui)
|
||||
|
||||
(run-tests file-tests)
|
||||
]
|
|
@ -7,9 +7,9 @@ RacUnit provides a textual and a graphical user interface
|
|||
|
||||
@section{Textual User Interface}
|
||||
|
||||
@defmodule[racunit/text-ui]
|
||||
@defmodule[rackunit/text-ui]
|
||||
|
||||
The textual UI is in the @racketmodname[racunit/text-ui] module.
|
||||
The textual UI is in the @racketmodname[rackunit/text-ui] module.
|
||||
It is run via the @racket[run-tests] function.
|
||||
|
||||
@defproc[(run-tests (test (or/c test-case? test-suite?))
|
||||
|
@ -33,10 +33,10 @@ information.
|
|||
|
||||
@section{Graphical User Interface}
|
||||
|
||||
@defmodule[racunit/gui]
|
||||
@defmodule[rackunit/gui]
|
||||
|
||||
RacUnit also provides a GUI test runner, available from the
|
||||
@racketmodname[racunit/gui] module.
|
||||
@racketmodname[rackunit/gui] module.
|
||||
|
||||
@defproc[(test/gui [test (or/c test-case? test-suite?)] ...)
|
||||
any]{
|
|
@ -11,7 +11,7 @@
|
|||
;; CONSTANTS
|
||||
|
||||
(define BACKTRACE-NO-MESSAGE "No message.")
|
||||
(define LINK-MODULE-SPEC 'racunit/private/gui/drracket-link)
|
||||
(define LINK-MODULE-SPEC 'rackunit/private/gui/drracket-link)
|
||||
|
||||
(define-namespace-anchor drracket-ns-anchor)
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
#lang racket
|
||||
(require racunit/gui)
|
||||
(provide (all-from-out racunit/gui))
|
||||
(require rackunit/gui)
|
||||
(provide (all-from-out rackunit/gui))
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#lang racket
|
||||
(require racunit/text-ui)
|
||||
(provide (all-from-out racunit/text-ui))
|
||||
(require rackunit/text-ui)
|
||||
(provide (all-from-out rackunit/text-ui))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
(require rackunit
|
||||
"check-test.rkt"
|
||||
"check-info-test.rkt"
|
||||
"format-test.rkt"
|
||||
|
@ -17,10 +17,10 @@
|
|||
"counter-test.rkt"
|
||||
"text-ui-util-test.rkt")
|
||||
|
||||
(provide all-racunit-tests
|
||||
(provide all-rackunit-tests
|
||||
failure-tests)
|
||||
|
||||
(define all-racunit-tests
|
||||
(define all-rackunit-tests
|
||||
(test-suite
|
||||
"All RacUnit Tests"
|
||||
check-tests
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/base)
|
||||
(require rackunit
|
||||
rackunit/private/base)
|
||||
|
||||
(provide base-tests)
|
||||
|
||||
|
@ -37,45 +37,45 @@
|
|||
(test-suite
|
||||
"All tests for base"
|
||||
(test-case
|
||||
"racunit-test-case structure has a contract on name"
|
||||
"rackunit-test-case structure has a contract on name"
|
||||
(check-exn exn:fail?
|
||||
(lambda ()
|
||||
(make-racunit-test-case
|
||||
(make-rackunit-test-case
|
||||
'foo
|
||||
(lambda () #t)))))
|
||||
(test-case
|
||||
"racunit-test-case structure has a contract on action"
|
||||
"rackunit-test-case structure has a contract on action"
|
||||
(check-exn exn:fail?
|
||||
(lambda ()
|
||||
(make-racunit-test-case
|
||||
(make-rackunit-test-case
|
||||
"Name"
|
||||
#f))))
|
||||
(test-case
|
||||
"racunit-test-suite has a contract on its fields"
|
||||
"rackunit-test-suite has a contract on its fields"
|
||||
(check-exn exn:fail?
|
||||
(lambda ()
|
||||
(make-racunit-test-suite
|
||||
(make-rackunit-test-suite
|
||||
#f
|
||||
(list)
|
||||
(lambda () 3)
|
||||
(lambda () 2))))
|
||||
(check-exn exn:fail?
|
||||
(lambda ()
|
||||
(make-racunit-test-suite
|
||||
(make-rackunit-test-suite
|
||||
"Name"
|
||||
#f
|
||||
(lambda () 3)
|
||||
(lambda () 2))))
|
||||
(check-exn exn:fail?
|
||||
(lambda ()
|
||||
(make-racunit-test-suite
|
||||
(make-rackunit-test-suite
|
||||
"Name"
|
||||
(list)
|
||||
#f
|
||||
(lambda () 2))))
|
||||
(check-exn exn:fail?
|
||||
(lambda ()
|
||||
(make-racunit-test-suite
|
||||
(make-rackunit-test-suite
|
||||
"Name"
|
||||
(list)
|
||||
(lambda () 3)
|
|
@ -27,8 +27,8 @@
|
|||
|
||||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/check-info)
|
||||
(require rackunit
|
||||
rackunit/private/check-info)
|
||||
|
||||
(provide check-info-tests)
|
||||
|
|
@ -30,10 +30,10 @@
|
|||
|
||||
(require racket/runtime-path
|
||||
srfi/1
|
||||
racunit
|
||||
racunit/private/check
|
||||
racunit/private/result
|
||||
racunit/private/test-suite)
|
||||
rackunit
|
||||
rackunit/private/check
|
||||
rackunit/private/result
|
||||
rackunit/private/test-suite)
|
||||
|
||||
(provide check-tests)
|
||||
|
||||
|
@ -288,7 +288,7 @@
|
|||
(cns (current-namespace)))
|
||||
(parameterize ((current-namespace destns))
|
||||
(namespace-require '(for-syntax racket/base))
|
||||
(namespace-require 'racunit/private/check)
|
||||
(namespace-require 'rackunit/private/check)
|
||||
;; First check that the right check macro got
|
||||
;; used: ie that it didn't just compile the thing
|
||||
;; as an application.
|
|
@ -28,10 +28,10 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racket/match
|
||||
racunit
|
||||
racunit/private/counter
|
||||
racunit/private/monad
|
||||
racunit/private/hash-monad)
|
||||
rackunit
|
||||
rackunit/private/counter
|
||||
rackunit/private/monad
|
||||
rackunit/private/hash-monad)
|
||||
|
||||
(provide counter-tests)
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/check-info
|
||||
racunit/private/format)
|
||||
(require rackunit
|
||||
rackunit/private/check-info
|
||||
rackunit/private/format)
|
||||
|
||||
(provide format-tests)
|
||||
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/monad
|
||||
racunit/private/hash-monad)
|
||||
(require rackunit
|
||||
rackunit/private/monad
|
||||
rackunit/private/hash-monad)
|
||||
|
||||
(provide hash-monad-tests)
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
;; Commentary:
|
||||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/location)
|
||||
(require rackunit
|
||||
rackunit/private/location)
|
||||
|
||||
(provide location-tests)
|
||||
|
|
@ -29,8 +29,8 @@
|
|||
|
||||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/monad)
|
||||
(require rackunit
|
||||
rackunit/private/monad)
|
||||
|
||||
(provide monad-tests)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/result)
|
||||
(require rackunit
|
||||
rackunit/private/result)
|
||||
|
||||
(provide result-tests)
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/text-ui
|
||||
"all-racunit-tests.rkt")
|
||||
(require rackunit
|
||||
rackunit/text-ui
|
||||
"all-rackunit-tests.rkt")
|
||||
|
||||
(run-tests all-racunit-tests)
|
||||
(run-tests all-rackunit-tests)
|
||||
|
||||
;; These tests should all error, so we switch the meaning of correct and incorrect. If the error display changes significantly, DrDr will catch it
|
||||
(parameterize ([current-error-port (current-output-port)]
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#lang racket/base
|
||||
|
||||
(require racunit/private/check)
|
||||
(require rackunit/private/check)
|
||||
|
||||
;; This check should succeed
|
||||
(check = 1 1 0.0)
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
#lang racket/base
|
||||
|
||||
(require racunit/private/check
|
||||
racunit/private/test-case)
|
||||
(require rackunit/private/check
|
||||
rackunit/private/test-case)
|
||||
|
||||
;; These tests should succeeds
|
||||
(test-begin (check-eq? 1 1))
|
|
@ -1,10 +1,10 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit/private/base
|
||||
racunit/private/check
|
||||
racunit/private/test-case
|
||||
racunit/private/test-suite
|
||||
racunit/private/result)
|
||||
(require rackunit/private/base
|
||||
rackunit/private/check
|
||||
rackunit/private/test-case
|
||||
rackunit/private/test-suite
|
||||
rackunit/private/result)
|
||||
|
||||
(provide test-case-tests)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/check)
|
||||
(require rackunit
|
||||
rackunit/private/check)
|
||||
|
||||
(define run? #f)
|
||||
|
|
@ -4,9 +4,9 @@
|
|||
racket/runtime-path
|
||||
srfi/1
|
||||
srfi/13
|
||||
racunit
|
||||
racunit/private/util
|
||||
racunit/private/location)
|
||||
rackunit
|
||||
rackunit/private/util
|
||||
rackunit/private/location)
|
||||
|
||||
(provide test-tests)
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
|||
(let ((destns (make-base-namespace))
|
||||
(cns (current-namespace)))
|
||||
(parameterize ((current-namespace destns))
|
||||
(namespace-require 'racunit)
|
||||
(namespace-require 'rackunit)
|
||||
(check-exn (lambda (e)
|
||||
(check-pred exn:fail:syntax? e)
|
||||
(check string-contains (exn-message e) msg))
|
|
@ -33,8 +33,8 @@
|
|||
racket/port
|
||||
srfi/1
|
||||
srfi/13
|
||||
racunit
|
||||
racunit/text-ui)
|
||||
rackunit
|
||||
rackunit/text-ui)
|
||||
|
||||
(provide text-ui-tests)
|
||||
|
|
@ -27,8 +27,8 @@
|
|||
;; Commentary:
|
||||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/text-ui-util)
|
||||
(require rackunit
|
||||
rackunit/private/text-ui-util)
|
||||
|
||||
(provide text-ui-util-tests)
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
(require racunit
|
||||
racunit/private/util)
|
||||
(require rackunit
|
||||
rackunit/private/util)
|
||||
|
||||
(provide util-tests)
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
|||
(check-true (procedure? make-failure-test))
|
||||
(check-equal? (make-arity-at-least 2)
|
||||
(procedure-arity make-failure-test))
|
||||
(check-pred racunit-test-case?
|
||||
(check-pred rackunit-test-case?
|
||||
(delay-test (make-failure-test "foo" string?)))))
|
||||
|
||||
(test-case
|
Loading…
Reference in New Issue
Block a user