/usr/share/racket/pkgs/contract-profile/tests.rkt is in racket-common 6.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #lang racket/base
(require contract-profile
(only-in contract-profile/utils dry-run? make-shortener))
(module+ test
(require rackunit)
(dry-run? #t) ; don't output to files
;; reported by Greg Hendershott
(check-true (contract-profile #t))
(require math)
(let ()
(define dim 200)
(define big1 (build-matrix dim dim (lambda (i j) (random))))
(define big2 (build-matrix dim dim (lambda (i j) (random))))
(define (main) (matrix* big1 big2))
(check-true (matrix? (contract-profile (main)))))
;; test path shortening
(define paths '("a/b/c.rkt" "a/b/d.rkt" ("a/b/e.rkt" f) (something else)))
(define shortener (make-shortener paths))
(check-equal? (map shortener paths)
(list (build-path "c.rkt")
(build-path "d.rkt")
(list (build-path "e.rkt") 'f)
'(something else)))
)
|