1
- /**
2
1
package f0
3
2
import Readers ._
4
3
import Writers ._
@@ -53,23 +52,24 @@ object FSharpIntegrationTest extends Properties("FSharpIntegrationTest"){
53
52
// make sure that we can write and read to files
54
53
property(" read and write to file" ) = secure {
55
54
// writes to f0/test/data-from-scala.dat
56
- val filename = "../ test/data-from-scala.dat"
55
+ val filename = " test/data-from-scala.dat"
57
56
val f = new java.io.File (filename); f.delete(); f.createNewFile()
58
57
values ?= writeAndReadAllValues(Sinks .toFile(filename), Sources .fromFile(filename))
59
58
}
60
59
61
60
// finally, do the integration testing
62
- property("write to and then read from f# process") = secure {
63
- val p = Runtime.getRuntime.exec( "../fsharp/f0/RoundTripTester/bin/Debug/RoundTripTester.exe")
64
- val result = writeAndReadAllValues(Sinks.toProcess(p), Sources.fromProcess(p))
65
- //println(result)
66
- values ?= result
67
- }
61
+ val fSharpRoundTripTester = " fsharp/f0/RoundTripTester/bin/Debug/RoundTripTester.exe"
62
+ property(" write to and then read from f# process" ) =
63
+ new java.io.File (fSharpRoundTripTester).exists ==> secure {
64
+ val p = Runtime .getRuntime.exec(fSharpRoundTripTester)
65
+ val result = writeAndReadAllValues(Sinks .toProcess(p), Sources .fromProcess(p))
66
+ // println(result)
67
+ values ?= result
68
+ }
68
69
69
70
// writes all the 'values' to the given sink,
70
71
// then reads them all back in from the given source
71
72
def writeAndReadAllValues (sink: Sink , source : => Source ) = {
72
73
writer.bind(sink)(values); sink.close; reader.bind(source).get
73
74
}
74
75
}
75
- **/
0 commit comments