"Racunit" -> "Rackunit"
original commit: 7b14a1f585d368bca8967072fbf3530d568e1391
This commit is contained in:
parent
7b401c4e80
commit
1cc6dee899
|
@ -2,7 +2,7 @@
|
|||
|
||||
(provide go go/text)
|
||||
|
||||
(require racunit racunit/text-ui
|
||||
(require rackunit rackunit/text-ui
|
||||
mzlib/etc scheme/port
|
||||
compiler/compiler
|
||||
scheme/match
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#lang typed/scheme/base
|
||||
|
||||
(require typed/racunit)
|
||||
(require typed/rackunit)
|
||||
(: my-+ : Integer Integer -> Integer)
|
||||
(define (my-+ a b)
|
||||
(if (zero? a)
|
|
@ -15,8 +15,8 @@
|
|||
"module-tests.ss" ;; pass
|
||||
"contract-tests.ss"
|
||||
|
||||
(r:infer infer infer-dummy)
|
||||
racunit racunit/text-ui)
|
||||
(r:infer infer infer-dummy)
|
||||
rackunit rackunit/text-ui)
|
||||
|
||||
(provide unit-tests)
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
(rep type-rep filter-rep object-rep)
|
||||
(types utils union convenience)
|
||||
(utils tc-utils)
|
||||
racunit)
|
||||
rackunit)
|
||||
|
||||
(define-syntax-rule (t e)
|
||||
(test-not-exn (format "~a" e) (lambda () (type->contract e (lambda _ (error "type could not be converted to contract"))))))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
(require (rep type-rep)
|
||||
(r:infer infer)
|
||||
(types convenience union utils abbrev)
|
||||
racunit)
|
||||
rackunit)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(private base-types-new base-types-extra colon)
|
||||
(for-template (private base-types-new base-types-extra base-env colon))
|
||||
(private parse-type)
|
||||
racunit)
|
||||
rackunit)
|
||||
|
||||
(provide parse-type-tests)
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
(rep type-rep)
|
||||
(r:infer infer infer-dummy)
|
||||
(types convenience subtype union remove-intersect)
|
||||
racunit)
|
||||
rackunit)
|
||||
|
||||
(define-syntax (over-tests stx)
|
||||
(syntax-case stx ()
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
(require "test-utils.ss" (for-syntax scheme/base)
|
||||
(rep type-rep)
|
||||
(types utils abbrev)
|
||||
racunit)
|
||||
rackunit)
|
||||
|
||||
(define-syntax-rule (s img var tgt result)
|
||||
(test-eq? "test" (substitute img 'var tgt) result))
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
(rep type-rep)
|
||||
(env init-envs type-environments)
|
||||
(r:infer infer infer-dummy)
|
||||
racunit
|
||||
rackunit
|
||||
(for-syntax scheme/base))
|
||||
|
||||
(provide subtype-tests)
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
scheme/gui/dynamic
|
||||
typed-scheme/utils/utils
|
||||
(for-syntax scheme/base)
|
||||
(types comparison utils)
|
||||
racunit racunit/text-ui)
|
||||
(types comparison utils)
|
||||
rackunit rackunit/text-ui)
|
||||
|
||||
(provide private typecheck (rename-out [infer r:infer]) utils env rep types)
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
(run-tests (mk-suite ts)))
|
||||
|
||||
(define (test/gui suite)
|
||||
(((dynamic-require 'racunit/private/gui/gui 'make-gui-runner))
|
||||
(((dynamic-require 'rackunit/private/gui/gui 'make-gui-runner))
|
||||
suite))
|
||||
|
||||
(define (run/gui . ts)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
(require "test-utils.ss" (for-syntax scheme/base)
|
||||
(rep type-rep)
|
||||
(types comparison abbrev union)
|
||||
racunit)
|
||||
rackunit)
|
||||
|
||||
(provide type-equal-tests)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
(utils tc-utils utils)
|
||||
unstable/mutated-vars
|
||||
(env type-name-env type-environments init-envs)
|
||||
racunit racunit/text-ui
|
||||
rackunit rackunit/text-ui
|
||||
syntax/parse
|
||||
(for-syntax (utils tc-utils)
|
||||
(typecheck typechecker)
|
||||
|
|
3
collects/typed/rackunit.rkt
Normal file
3
collects/typed/rackunit.rkt
Normal file
|
@ -0,0 +1,3 @@
|
|||
#lang racket
|
||||
(require typed/rackunit/main)
|
||||
(provide (all-from-out typed/rackunit/main))
|
|
@ -1,9 +1,9 @@
|
|||
#lang typed/scheme
|
||||
(require typed/racunit
|
||||
(require typed/rackunit
|
||||
typed/private/utils)
|
||||
|
||||
(require/typed/provide
|
||||
racunit/gui
|
||||
rackunit/gui
|
||||
[test/gui
|
||||
(Test * -> Any)]
|
||||
[make-gui-runner
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
; 3.2
|
||||
(require/typed/provide
|
||||
racunit
|
||||
rackunit
|
||||
[check (All (A B C)
|
||||
(case-lambda
|
||||
((A B -> C) A B -> C)
|
||||
|
@ -62,11 +62,11 @@
|
|||
; 3.2.1
|
||||
(require-typed-struct check-info
|
||||
([name : Symbol] [value : Any])
|
||||
racunit)
|
||||
rackunit)
|
||||
(define-type CheckInfo check-info)
|
||||
(provide (struct-out check-info) CheckInfo)
|
||||
(require/typed/provide
|
||||
racunit
|
||||
rackunit
|
||||
[make-check-name (String -> CheckInfo)]
|
||||
[make-check-params ((Listof Any) -> CheckInfo)]
|
||||
[make-check-location ((List Any (Option Number) (Option Number) (Option Number) (Option Number)) -> CheckInfo)]
|
||||
|
@ -75,23 +75,23 @@
|
|||
[make-check-actual (Any -> CheckInfo)]
|
||||
[make-check-expected (Any -> CheckInfo)]
|
||||
[with-check-info* (All (A) ((Listof CheckInfo) (Thunk A) -> A))])
|
||||
(require (only-in racunit with-check-info))
|
||||
(require (only-in rackunit with-check-info))
|
||||
(provide with-check-info)
|
||||
|
||||
; 3.2.2
|
||||
(require (only-in racunit define-simple-check define-binary-check define-check fail-check))
|
||||
(require (only-in rackunit define-simple-check define-binary-check define-check fail-check))
|
||||
(provide define-simple-check define-binary-check define-check fail-check)
|
||||
|
||||
; 3.2.3
|
||||
(require/typed/provide
|
||||
racunit
|
||||
rackunit
|
||||
[current-check-handler
|
||||
(Parameter (Any -> Any))]
|
||||
[current-check-around
|
||||
(Parameter ((Thunk Any) -> Any))])
|
||||
|
||||
; 3.3
|
||||
(require (prefix-in t: (except-in racunit struct:check-info struct:exn:test struct:exn:test:check struct:test-result struct:test-failure
|
||||
(require (prefix-in t: (except-in rackunit struct:check-info struct:exn:test struct:exn:test:check struct:test-result struct:test-failure
|
||||
struct:test-error struct:test-success)))
|
||||
(define-rewriter t:test-begin test-begin
|
||||
[t:current-test-case-around current-test-case-around]
|
||||
|
@ -105,49 +105,49 @@
|
|||
[t:current-check-around current-check-around])
|
||||
(provide test-begin test-case)
|
||||
|
||||
(require/opaque-type TestCase test-case? racunit)
|
||||
(require/opaque-type TestCase test-case? rackunit)
|
||||
(provide TestCase test-case?)
|
||||
|
||||
(require (only-in racunit test-suite))
|
||||
(require (only-in rackunit test-suite))
|
||||
(provide test-suite)
|
||||
(require/opaque-type TestSuite test-suite? racunit)
|
||||
(require/opaque-type TestSuite test-suite? rackunit)
|
||||
(provide TestSuite test-suite?)
|
||||
|
||||
(define-type Test (U TestCase TestSuite))
|
||||
(provide Test)
|
||||
|
||||
(require/typed/provide
|
||||
racunit
|
||||
rackunit
|
||||
[make-test-suite
|
||||
(case-lambda
|
||||
(String (Listof Test) -> TestSuite)
|
||||
; XXX #:before #:after
|
||||
)])
|
||||
|
||||
(require (only-in racunit define-test-suite define/provide-test-suite))
|
||||
(require (only-in rackunit define-test-suite define/provide-test-suite))
|
||||
(provide define-test-suite define/provide-test-suite)
|
||||
|
||||
(require/typed/provide
|
||||
racunit
|
||||
rackunit
|
||||
[current-test-name (Parameter (Option String))]
|
||||
[current-test-case-around (Parameter ((Thunk Any) -> Any))]
|
||||
[test-suite-test-case-around ((Thunk Any) -> Any)]
|
||||
[test-suite-check-around ((Thunk Any) -> Any)])
|
||||
|
||||
; 3.4
|
||||
(require (only-in racunit before after around delay-test))
|
||||
(require (only-in rackunit before after around delay-test))
|
||||
(provide before after around delay-test)
|
||||
|
||||
; 3.5
|
||||
; XXX require/expose seems WRONG for typed/scheme
|
||||
|
||||
; 3.7
|
||||
(require-typed-struct (exn:test exn) () racunit)
|
||||
(require-typed-struct (exn:test:check exn:test) ([stack : (Listof CheckInfo)]) racunit)
|
||||
(require-typed-struct test-result ([test-case-name : (Option String)]) racunit)
|
||||
(require-typed-struct (test-failure test-result) ([result : Any]) racunit)
|
||||
(require-typed-struct (test-error test-result) ([result : Any]) racunit)
|
||||
(require-typed-struct (test-success test-result) ([result : Any]) racunit)
|
||||
(require-typed-struct (exn:test exn) () rackunit)
|
||||
(require-typed-struct (exn:test:check exn:test) ([stack : (Listof CheckInfo)]) rackunit)
|
||||
(require-typed-struct test-result ([test-case-name : (Option String)]) rackunit)
|
||||
(require-typed-struct (test-failure test-result) ([result : Any]) rackunit)
|
||||
(require-typed-struct (test-error test-result) ([result : Any]) rackunit)
|
||||
(require-typed-struct (test-success test-result) ([result : Any]) rackunit)
|
||||
(provide (struct-out exn:test) (struct-out exn:test:check)
|
||||
(struct-out test-result)
|
||||
(struct-out test-failure) (struct-out test-error) (struct-out test-success))
|
||||
|
@ -157,7 +157,7 @@
|
|||
(Listof (U A The-Tree))))
|
||||
|
||||
(require/typed/provide
|
||||
racunit
|
||||
rackunit
|
||||
[run-test-case
|
||||
((Option String) (Thunk Any) -> test-result)]
|
||||
[run-test
|
|
@ -1,14 +1,14 @@
|
|||
#lang typed/scheme
|
||||
(require typed/racunit
|
||||
(require typed/rackunit
|
||||
typed/private/utils)
|
||||
|
||||
(define-type Verbosity
|
||||
(U 'quiet 'normal 'verbose))
|
||||
|
||||
(require/typed/provide
|
||||
racunit/text-ui
|
||||
rackunit/text-ui
|
||||
[run-tests
|
||||
(case-lambda
|
||||
(Test -> Natural)
|
||||
(Test Verbosity -> Natural))])
|
||||
(provide Verbosity)
|
||||
(provide Verbosity)
|
|
@ -1,17 +1,17 @@
|
|||
#lang scheme/base
|
||||
|
||||
(require typed-scheme/utils/utils
|
||||
(prefix-in ru: (combine-in racunit racunit/private/test-case racunit/private/check))
|
||||
(prefix-in ru: (combine-in rackunit rackunit/private/test-case rackunit/private/check))
|
||||
(for-syntax
|
||||
scheme/base syntax/parse
|
||||
(utils tc-utils)
|
||||
(env init-envs)
|
||||
(env init-envs)
|
||||
(except-in (rep filter-rep object-rep type-rep) make-arr)
|
||||
(types convenience union)
|
||||
(only-in (types convenience) [make-arr* make-arr])))
|
||||
|
||||
(define-for-syntax unit-env
|
||||
(make-env
|
||||
(make-env
|
||||
[ru:check-around
|
||||
(-poly (a) (-> (-> a) a))]
|
||||
;; current-test-case-around
|
||||
|
@ -20,4 +20,4 @@
|
|||
[(_ _ . _) #'ctca])
|
||||
(-poly (a) (-> (-> a) a))]))
|
||||
|
||||
(begin-for-syntax (initialize-type-env unit-env))
|
||||
(begin-for-syntax (initialize-type-env unit-env))
|
Loading…
Reference in New Issue
Block a user