diff --git a/collects/frtime/info.ss b/collects/frtime/info.ss index e4fdf269e1..abee451d62 100644 --- a/collects/frtime/info.ss +++ b/collects/frtime/info.ss @@ -1,6 +1,6 @@ #lang setup/infotab -(define compile-omit-paths '("demos")) +(define compile-omit-paths '("demos" "tests")) (define scribblings '(("frtime.scrbl" () (experimental)))) (define tools '("frtime-tool.ss")) diff --git a/collects/frtime/tests/erl.ss b/collects/frtime/tests/erl.ss new file mode 100644 index 0000000000..d1240b312d --- /dev/null +++ b/collects/frtime/tests/erl.ss @@ -0,0 +1,6 @@ +#lang scheme +(require frtime/erl) + +(define t (spawn/name 'test (receive [#f (error 'test "Got an #f")]))) + +(! t #t) \ No newline at end of file diff --git a/collects/frtime/tests/heap.ss b/collects/frtime/tests/heap.ss new file mode 100644 index 0000000000..e758292615 --- /dev/null +++ b/collects/frtime/tests/heap.ss @@ -0,0 +1,27 @@ +#lang scheme +(require frtime/heap) + +(define f (make-heap > eq?)) +(heap-insert f 99) +(printf "A ~S~n" f) +(heap-remove-pos f 1) +(printf "B ~S~n" f) +(for-each (lambda (x) (heap-insert f x)) '(1 2 3 4 5 6 7 8 9 10 11 12 13 14)) +(printf "C ~S~n" f) +(heap-remove f 10) (printf "~S~n" f) +(heap-remove f 5) (printf "~S~n" f) +(heap-remove f 8) (printf "~S~n" f) +(heap-remove f 13) (printf "~S~n" f) +(printf "~S~n" (heap-contains f 11)) +(printf "~S~n" (heap-contains f 123)) +(heap-pop f) +(heap-pop f) +(heap-pop f) +(heap-pop f) (printf "~S~n" f) +(printf "~S~n" (heap-contains f 11)) +(printf "~S~n" (heap-contains f 4)) +(printf "~S~n" f) +(heap-remove f 2) +(printf "~S~n" f) +(heap-remove f 3) +(printf "~S~n" f)