Revision: 394
Author: wol...@gm...
Date: Tue Aug 11 13:34:07 2009
Log: change a path name so that tests can now be run from the main HOC
directory,
where the cabal file that builds the tests is located
http://code.google.com/p/hoc/source/detail?r=394
Modified:
/trunk/hoc/Tests/TestFoundation.hs
=======================================
--- /trunk/hoc/Tests/TestFoundation.hs Sat Feb 14 12:53:11 2009
+++ /trunk/hoc/Tests/TestFoundation.hs Tue Aug 11 13:34:07 2009
@@ -20,6 +20,9 @@
import MiniFoundation
+ -- (relative) path name of a text file that can be assumed to exist
+testTextFile = "HOC.cabal"
+
-- garbage collect and make really sure that finalizers have time to
run
performGCAndWait targetCount time maxRepeat = do
performGC
@@ -176,9 +179,9 @@
fromNSString (toNSString "Hello, world.") @?= "Hello,
world."
),
"initWithContentsOfFile" ~: (assertNoLeaks $ do
- expected <- readFile "TestFoundation.hs"
+ expected <- readFile testTextFile
actual_ns <- _NSString # alloc >>= initWithContentsOfFile
-
(toNSString "TestFoundation.hs")
+ (toNSString
testTextFile)
fromNSString actual_ns @?= expected
),
"Unicode" ~:
|