Changeset 1954


Ignore:
Timestamp:
12/20/06 17:10:00 (13 years ago)
Author:
curtis
Message:

Bugfixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/test/ReaderTest.java

    r1953 r1954  
    6161 
    6262  /** Debugging flag. */ 
    63   private static final boolean DEBUG = false; 
     63  private static final boolean DEBUG = true; 
    6464 
    6565  // -- Static fields -- 
     
    336336        continue; 
    337337      } 
    338       if (new File(subs[i]).isDirectory()) getFiles(subs[i], files); 
     338      File file = new File(subs[i]); 
     339      if (file.isDirectory()) getFiles(subs[i], files); 
    339340      else { 
    340341        if (ir.isThisType(subs[i])) { 
    341342          if (DEBUG) debug("Adding " + subs[i]); 
    342           files.add(subs[i]); 
     343          files.add(file.getAbsolutePath()); 
    343344        } 
    344345        else if (DEBUG) debug(subs[i] + " has invalid type"); 
     
    384385    getFiles(args[0], files); 
    385386    System.out.println(files.size() + " found."); 
    386     FileStitcher stitcher = new FileStitcher(); 
    387387    while (files.size() > 0) { 
    388388      String id = (String) files.get(0); 
    389       try { 
    390         FilePattern fp = stitcher.getFilePattern(id); 
    391         System.out.println("Testing " + fp.getPattern()); 
    392       } 
    393       catch (FormatException exc) { exc.printStackTrace(); } 
    394       catch (IOException exc) { exc.printStackTrace(); } 
     389      String pattern = FilePattern.findPattern(new File(id)); 
     390      System.out.println("Testing " + pattern); 
    395391      TestResult result = new TestResult(); 
    396392      TestSuite suite = suite(id); 
     
    406402      String[] used = test.getUsedFiles(); 
    407403      for (int i=0; i<used.length; i++) { 
    408         if (DEBUG) System.out.println("Removing " + used[i]); 
     404        if (DEBUG) System.out.println(id + ": Removing " + used[i]); 
    409405        files.removeElement(used[i]); 
    410406      } 
Note: See TracChangeset for help on using the changeset viewer.