]> gitweb.factorcode.org Git - factor.git/commitdiff
better io.mmap test
authorDoug Coleman <doug.coleman@gmail.com>
Fri, 27 Feb 2009 01:58:25 +0000 (19:58 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Fri, 27 Feb 2009 01:58:25 +0000 (19:58 -0600)
basis/io/mmap/mmap-tests.factor

index 70a1869bd0f454780842dbfc1e1fceaa142ad67b..a4d55f3c1e040380c4b6ac1161ae3b3676585f24 100644 (file)
@@ -11,21 +11,11 @@ IN: io.mmap.tests
 [ "mmap-test-file.txt" temp-file delete-file ] ignore-errors
 
 
-[ ]
-[ "mmap-empty-file.txt" temp-file touch-file ] unit-test
+[ "mmap-empty-file.txt" temp-file delete-file ] ignore-errors
+[ ] [ "mmap-empty-file.txt" temp-file touch-file ] unit-test
 
-! Test for leaking resources bug on Unix
-[ ]
 [
-    100000 [
-        [
-            "mmap-empty-file.txt" temp-file [
-                drop
-            ] with-mapped-file
-        ] [ dup bad-mmap-size? [ drop ] [ rethrow ] if ] recover
-    ] times
-
-    "asdf" "mmap-asdf-file.txt" temp-file [ ascii set-file-contents ] keep [
+    "mmap-empty-file.txt" temp-file [
         drop
     ] with-mapped-file
-] unit-test
+] [ bad-mmap-size? ] must-fail-with