public void runTests() throws IOException {
  List<List<String>> tests=new ArrayList<>();
  List<String> test=new ArrayList<>();
  String line=reader.readLine();
  while (line != null) {
switch (line) {
case "!":
      tests.add(test);
    test=new ArrayList<>();
  break;
default :
test.add(line);
break;
}
line=reader.readLine();
}
tests.add(test);
tests=tests.subList(1,tests.size());
for (List<String> t : tests) {
TestThread thread=new TestThread(t);
thread.start();
thread.join();
}
}

public void runTests ( ) throws IOException { List < List < String > > tests = new ArrayList < > ( ) ; List < String > test = new ArrayList < > ( ) ; String line = reader . readLine ( ) ; while ( line != null ) { switch ( line ) { case "!" : tests . add ( test ) ; test = new ArrayList < > ( ) ; break ; default : test . add ( line ) ; break ; } line = reader . readLine ( ) ; } tests . add ( test ) ; tests = tests . subList ( 1 , tests . size ( ) ) ; for ( List < String > t : tests ) { TestThread thread = new TestThread ( t ) ; thread . start ( ) ; thread . join ( ) ; } }
splits the test file into individual tests , and then run each of them on their own thread .
