Make test files have mains that run the test case defined in them.
original commit: 6bf7c4efd4c513c8143806f9f578ce1ba44010cd
This commit is contained in:
parent
7eb3ef16ef
commit
306a8b4e7b
|
@ -8,6 +8,7 @@
|
|||
(types abbrev numeric-tower union)
|
||||
rackunit)
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
|
||||
(define-syntax-rule (t e)
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
rackunit
|
||||
(types numeric-tower utils abbrev))
|
||||
|
||||
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define-syntax-rule (fv-t ty elems ...)
|
||||
(let ([ty* ty])
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#lang racket/base
|
||||
|
||||
(require
|
||||
"test-utils.rkt"
|
||||
racket/base
|
||||
racket/port
|
||||
racket/promise
|
||||
|
@ -11,6 +12,7 @@
|
|||
syntax/parse))
|
||||
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define promised-ns
|
||||
(delay
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
racket/match racket/set
|
||||
rackunit)
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define-syntax-rule (t arg expected)
|
||||
(begin
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
racket/dict)
|
||||
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
;; HORRIBLE HACK!
|
||||
;; We are solving the following problem:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
(types abbrev numeric-tower subtype union remove-intersect)
|
||||
rackunit)
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define-syntax (over-tests stx)
|
||||
(syntax-case stx ()
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
typed-racket/base-env/base-types
|
||||
(for-syntax typed-racket/standard-inits))
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(begin-for-syntax (do-standard-inits))
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
(types utils abbrev numeric-tower substitute)
|
||||
rackunit)
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define-syntax-rule (s img var tgt result)
|
||||
(test-eq? "test" (substitute img 'var tgt) result))
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
(for-syntax scheme/base))
|
||||
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define-syntax (subtyping-tests stx)
|
||||
(define (single-test stx)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
scheme/match
|
||||
scheme/gui/dynamic
|
||||
typed-racket/utils/utils
|
||||
(for-syntax scheme/base)
|
||||
(for-syntax scheme/base syntax/parse)
|
||||
(types utils)
|
||||
(rep type-rep)
|
||||
rackunit rackunit/text-ui)
|
||||
|
@ -25,3 +25,10 @@
|
|||
(syntax-case stx ()
|
||||
[(_ nm a b)
|
||||
(syntax/loc stx (test-case nm (check-tc-result-equal?* a b)))]))
|
||||
|
||||
(define-syntax gen-test-main
|
||||
(syntax-parser
|
||||
[(stx:id)
|
||||
#`(module* main #f
|
||||
(require rackunit/text-ui)
|
||||
(void (run-tests #,(datum->syntax #'stx 'tests))))]))
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
rackunit)
|
||||
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
(define (-base x) (make-Base x #'dummy values #f))
|
||||
|
||||
|
|
|
@ -55,12 +55,14 @@
|
|||
|
||||
(require
|
||||
"evaluator.rkt"
|
||||
"test-utils.rkt"
|
||||
(for-syntax
|
||||
racket/base
|
||||
syntax/parse
|
||||
'tester))
|
||||
|
||||
(provide tests)
|
||||
(gen-test-main)
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Reference in New Issue
Block a user