Move tests for SRFIs to "racket-test".

This commit is contained in:
Sam Tobin-Hochstadt 2014-12-18 15:09:26 -05:00
parent 37daa2bf65
commit a59ad8b929
4 changed files with 18 additions and 22 deletions

View File

@ -528,9 +528,4 @@
(test '(20 19 18 17 16 15 14 13 12 11) range 20 10 -1)
(test '(10 11.5 13.0 14.5) range 10 15 1.5))
;; ---------- check no collisions with srfi/1 ----------
(test (void)
eval '(module foo scheme/base (require scheme/base srfi/1/list))
(make-base-namespace))
(report-errs)

View File

@ -229,9 +229,4 @@
(err/rt-test (vector-map (lambda (x) x) #() #() #()) (check-regs #rx"vector-map" #rx"mismatch between procedure arity")))
;; ---------- check no collisions with srfi/43 ----------
#;(test (void)
eval '(module foo scheme/base (require scheme/base srfi/43))
(make-base-namespace))
(report-errs)

View File

@ -0,0 +1,3 @@
#lang racket/base
;; ---------- check no collisions with srfi/1 ----------
(require scheme/base srfi/1/list)

View File

@ -1,10 +1,16 @@
#lang racket/base
(load-relative "loadtest.rktl")
(Section 'char-set/srfi-14)
(require rackunit)
(require srfi/14/char-set)
(define-syntax test
(syntax-rules ()
[(_ #t p? args ...) (check-true (p? args ...))]
[(_ #f p? args ...) (check-false (p? args ...))]
[(_ e args ...) (check-equal? e (args ...))]))
(define-syntax-rule (err/rt-test e) (check-exn exn:fail? (λ () e)))
;; NOTE: tests assume that ! functions are actually functional
;; Check char sets ----------------------------------------
@ -295,7 +301,8 @@
)
;; ----------------------------------------
;;; This is a regression testing suite for the SRFI-14 char-set library.
;;; Olin Shivers
@ -304,9 +311,9 @@
(begin (one-test tst) ...))))
(one-test (syntax-rules (let)
((_ (let . rest))
(test #t 'let... (let . rest)))
(check-true (let . rest)))
((_ (op arg ...))
(test #t op arg ...)))))
(check-true (op arg ...))))))
(let ((vowel? (lambda (c) (member c '(#\a #\e #\i #\o #\u)))))
(tests
@ -504,8 +511,4 @@
;; ----------------------------------------
;; PR 8624 --- make sure there's no error:
(test #t values (string? (char-set->string (char-set-complement char-set:graphic))))
;; ----------------------------------------
(report-errs)
(check-true (string? (char-set->string (char-set-complement char-set:graphic))))