Commit 016966cd authored by HankG's avatar HankG

Fixed regexredux test

parent fa11805d
......@@ -3,7 +3,7 @@
http://benchmarksgame.alioth.debian.org/
Based on Java regex-dna program (#5) contributed by Michael Stover
Contributed by Hank Grabowski
*/
......@@ -31,8 +31,8 @@ object regexredux {
val r = BufferedReader(InputStreamReader(System.`in`,
"US-ASCII"))
val sb = StringBuffer()
var line: String = ""
while ({line = r.readLine(); line}() != null) {
var line: String? = null
while ({line = r?.readLine()?:null; line}() != null) {
sb.append(line)
sb.append("\n")
}
......
......@@ -74,6 +74,7 @@ onlydirs =
mandelbrot
pidigits
regexredux
revcomp
......@@ -138,10 +139,10 @@ pidigits = 1 100 1000 2500 5000 10000
[testdata]
knucleotide = ../knucleotide-input.txt
knucleotide = ../knucleotide-input10000.txt
regexdna = ../regexdna-input.txt
regexredux = ../regexdna-input.txt
revcomp = ../revcomp-input.txt
regexredux = ../regexdna-input10000.txt
revcomp = ../revcomp-input1000.txt
......
......@@ -3,7 +3,7 @@
http://benchmarksgame.alioth.debian.org/
Based on Java regex-dna program (#5) contributed by Michael Stover
Contributed by Hank Grabowski
*/
......@@ -31,8 +31,8 @@ object regexredux {
val r = BufferedReader(InputStreamReader(System.`in`,
"US-ASCII"))
val sb = StringBuffer()
var line: String = ""
while ({line = r.readLine(); line}() != null) {
var line: String? = null
while ({line = r?.readLine()?:null; line}() != null) {
sb.append(line)
sb.append("\n")
}
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment